You can use the FileSystemWatcher class.
On the DocumentBeforeSave event: define your document to watch and listen for changed events
http://msdn.microsoft.com/
Main Topics
Browse All TopicsHi,
Is there any way I can run a procedure in my Word VSTO add-in (2003 & 2007) immediately after a document has saved? The Application.DocumentBefore
I know there is a solution using the OnTime method and a macro but I can't use macros.
Thanks,
Pete
Xenacode
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
You can use the FileSystemWatcher class.
On the DocumentBeforeSave event: define your document to watch and listen for changed events
http://msdn.microsoft.com/
Um, you are right it is impractical.
This link will give you some ideas
http://social.msdn.microso
Even though refers to Excel, you are dealing with the same issue.
The proposed answer is to use the beforesave event as follows:
set cancel so that Word Save dialog is not used.
Use your own save dialog.
then you can run your procedure.
Works perfectly (for my purposes).
However there is a potential problem with this solution.
If the user has another Word add-in installed that also uses this method to capture the save event then it gets messy. You could get two dialogs displayed one after the other which would really mess up the user experience. I would only recommend this solution where you have a tight control over what is installed on the machine. I.e. this is not something you want to put into an application that you distribute to the public.
Pete
Xenacode
Business Accounts
Answer for Membership
by: xenacodePosted on 2009-10-19 at 03:36:25ID: 25603969
...and I should probably add that I don't want a solution that involves starting a timer on the DocumentBeforeSave event then periodically checking to see if the document has saved...
I'm sure no self-respecting expert would dream of suggesting such a thing ;o)
Pete