Automating word and watch for save

B

Brandon Owensby

We are automating word in our application with the hopes of being able to
watch for when someone saves the loaded document so we can put it back to
our server. Unfortunatly I cannot stop the Save As dialog from coming up in
Office XP...however I can in 2003...go figure....so I can't really control
the save myself. This being said how can I know the file has been saved and
then find out the location so I can then upload it back to our server. If
there is a way to make sure the Save As Dialog doesn't come up then is there
a way I can bring it up myself if I feel it is necessary?

Thanks,
Brandon
 
C

Cindy M.

Hi Brandon,
We are automating word in our application with the hopes of being able to
watch for when someone saves the loaded document so we can put it back to
our server. Unfortunatly I cannot stop the Save As dialog from coming up in
Office XP...however I can in 2003...go figure....so I can't really control
the save myself. This being said how can I know the file has been saved and
then find out the location so I can then upload it back to our server. If
there is a way to make sure the Save As Dialog doesn't come up then is there
a way I can bring it up myself if I feel it is necessary?
You should be able to sink the DocumentBeforeSave event, even if the Word 2002
implementation doesn't give you control over the dialog box being displayed.
But after the event has fired, you can check the SAVED property of the document
that triggered the event. If it's true, the user did save the document. You get
the path using the FullName property of that document object. And you can use
the application.dialogs(wdDialogFileSaveAs).Show (or Display) method to bring
the dialog box up.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top