Results 1 to 1 of 1
Thread: When closing word (word)
2001-07-23, 14:32 #1
- Join Date
- Feb 2001
- Yilgarn region of Toronto, Ontario
- Thanked 0 Times in 0 Posts
When closing word (word)
***Edited by BAM to include URL tags***
Also I was wnadering do you know of a Word Macro that can be used as a sfetey net when closing word. Quite often I find when I or others close word the prompt to save the current (or any open document) pops up but in ones eagerness to get home at the end of the day, NO is clicked on instead of yes so all the changes get los (ok Autosave helps to an extent but its not foolproof) but my idea is that the Macro would save the document anyway but in a preset specified location. When word is restarted if any files exist in the safety net the user will be prompted to restore them or delete or copy them. This would definately safe on the frustration of closing word and realising that you did not save hours or work which needs to be repeated.
Yes, this can be done - almost. In recent messages on Woody's Lounge the use of the Application.Quit event has been discussed.
You might read this thread carefully, especially Kevin's remarks <A target="_blank" HREF=http://www.wopr.com/cgi-bin/w3t/showflat.pl?Cat=&Board=vb&Number=35825&page=&view= &sb=&o=&vc=1>http://www.wopr.com/cgi-bin/w3t/showflat.p...ew=&sb=&o=&vc=1</A> and do a search in the Word forum and the VB/VBA forum for "Application.Quit".
It is possible to place a macro in, for example, Normal.dot, to trap the Quit event and force all files to be saved.
It would not be difficult to write a macro to effect saving in an out-of-the-way site.
Pasted below is a section from the Word97 VBA help files.
expression.Quit(SaveChanges, Format, RouteDocument)
expression Required. An expression that returns an Application object.
SaveChanges Optional Variant. Specifies whether Word saves changed documents before quitting. Can be one of the following WdSaveOptions constants: wdDoNotSaveChanges, wdPromptToSaveChanges, or wdSaveChanges.
OriginalFormat Optional Variant. Specifies the way Word saves documents whose original format was not Word Document format. Can be one of the following WdOriginalFormat constants: wdOriginalDocumentFormat, wdPromptUser, or wdWordDocument.
RouteDocument Optional Variant. True to route the document to the next recipient. If the document doesn't have a routing slip attached, this argument is ignored.