DocumentBeforeSave event and AutoRecover

R

Rich Conway

Does anyone know if there is a way to differentiate
between a DocumentBeforeSave event kicked off by the user
and the same event kicked off by Word's AutoRecover
feature? I am using Word 2002.

Rich Conway
 
P

Perry

If a document is not saved yet
(Path property of the file in question results in an empty string) you can
use the input/output parameter: SaveAsUi to differentiate.

SaveAsUi = True when user saves
SaveAsUi = False when word tries to AutoRecover

more info
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbawd10/htm
l/woevtdocumentbeforesave.asp

If the file has been saved before, the
DocumentBeforeSave event fires in both instances and there's
no way to differentiate.

Perhaps, replacing the Word's builtin FileSave macro to
read your own will be of help.
Look at related article
http://www.mvps.org/word/FAQs/MacrosVBA/SaveInCertainFolder.htm

Krgrds,
Perry
 

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