Maybe you will need to try and make use of the Document.Compare.Method to determine if any revisions have been made to the document.
-- Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis.
Doug Robbins - Word MVP
"Erkav" <Erkav[ at ]discussions.microsoft.com> wrote in message news:E8343B3E-132C-40E2-B183-685BDC99B3DE[ at ]microsoft.com...
[Quoted Text] > Thanks for your reply Doug. > But your suggestion doesn't solve my problem. May i give some details > about > my application. > My application is a little member of a Document Management System. It' s a > client that developed to open files that store in DMS. Application hasn't > got > a UI. It is only downloads the files from a web service of DMS and serves > to > operating system to open files with default viewer that defined in OP. My > app > takes file hash code before open it after than waits to close application > that launched by OP. Finally my app takes file hash code and compares > these 2 > hash codes. If hash codes are different, my app uploads the file to DMS as > a > new version of file via web service. But this algorithm doesn't work for > Word > files as i tried to describe on my previous post. On the other hand, my > app > have some specifications for Word documents. It opens file that has ".doc" > extension with office PIAs to load some checks and to load some special > toolbar buttons. It handles some Word application events to run its > subcontrols. Now, how should i find out the document exactly not changed. > When i handle Word.BeforeDocumentClose event, if user clicks the save > button > before closing document, Document.Saved property set true and the > document' s > last version different from the first version. My app has to perceive that > difference. > > "Doug Robbins - Word MVP" wrote: > >> Make use of the Document.Saved property. >> >> It returns True if the specified document or template has not changed >> since >> it was last saved. False if Microsoft Word displays a prompt to save >> changes >> when the document is closed. It is a Read/write Boolean property. >> >> >> -- >> Hope this helps. >> >> Please reply to the newsgroup unless you wish to avail yourself of my >> services on a paid consulting basis. >> >> Doug Robbins - Word MVP >> >> "Erkav" <Erkav[ at ]discussions.microsoft.com> wrote in message >> news:A44DD7F1-0DD8-4229-8B68-49CF54CDF929[ at ]microsoft.com... >> > Hi, >> > i developed a program in C# 2.0 with office 2003 PIAs. I try to detect >> > a >> > word document has been changed or not. I try to check a word document >> > file >> > hash codes before open and after close. Even the document has not been >> > changed but these two hash code always different. And also document >> > before >> > opening and after opening hash codes are different too. I tried to >> > check >> > content property of word documents but i met same result. How can i >> > detect >> > a >> > word document has been really changed? >> > >> > Thanks. >> >> >>
|