Recognizing new or already known document with VSTO?

What i'd probably do in that case is add a DOCUMENT VARIABLE or DOCUMENT PROPERTY with a value of a GUID.

What i'd probably do in that case is add a DOCUMENT VARIABLE or DOCUMENT PROPERTY with a value of a GUID. Then when you push the file, the server could extract that property, get the guid and easily perform a lookup to see if the doc is already there. At least, that'd be another way (other than say, user and filename) to id the document.

This is what I just thought, but I didn't know there was a way to embed data in the documents. I'm interested in doc/docx and ppt/pptx. Will it work for the older formats?

Filenames are often changed so I'm trying to work around that. Can you provide an example code that writes a var/property to the document itself? Or maybe some useful links?

Thanks so much :) – stormbreaker May 11 at 21:08 It looks like a royal pain but it's not that bad. See this MS article. Support.microsoft.Com/kb/303296 It even has a big chunk of code that shows the necessary way to do this when running against various versions of word (they changed the typelibs between several versions for the CustomDocumentProperties property, so you can early bind to it consistently.

– drventure May 11 at 21:35 Thanks, I will check these out. – stormbreaker May 12 at 7:05.

You can use Custom Properties but in PPT I'd use tags instead; the user can't see/meddle with them. Assuming a reference to your presentation in oPres With oPres .Tags. Add "Uploaded", "YES" .Tags.

Add "LastUploadDate", "some string you've formatted to taste" .Tags. Add "AnythingElse", "You'd like to record" End With and With oPres If . Tags("Uploaded") = "YES" Then ' nothing to do Else ' upload it End If End With.

Thanks for the answer. What exactly is the difference between properties and tags? Why it's best to use one instead of the other?

Thanks again :) – stormbreaker May 19 at 10:26 Functionally they're similar. Both are collections (though Tags are always strings, custom properties can be other data types). As far as I know, only PowerPoint has tags, so it might be simpler to write for multiple apps using properties.

On the other hand, PowerPoint allocates only a limited amouht of space to store properties, hyperlinks and possibly other stuff that's not documented. Add too much data to properties and you could make a presntation's hyperlinks go corrupt. Again, the user can see (edit, delete) custom properties.

They can't see tags. – Steve Rindsberg May 20 at 20:43 I need the solution to work on powerpoint AND word documents so it means I'll stick to the properties. I can shrink the property data to a simple int (an id) so size shouldn't be a problem here.

Thanks again for trying to help :) – stormbreaker May 20 at 21:51 1 That sounds like a plan, especially given the tiny amount of data you need to store. – Steve Rindsberg May 21 at 16:38.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions