WD: AutoClose Macro Is Executed Before Document Is ClosedLast reviewed: February 11, 1998Article ID: Q41735 |
The information in this article applies to:
SUMMARYIn Microsoft Word, an AutoClose macro is run when you close a document. However, if changes have been made to the document since the last time it was saved, Word prompts you to save the changes after the AutoClose macro has finished running. If you want the document to be closed without having Word display the save message, include a command in your AutoClose macro to save the edited document without issuing this prompt.
MORE INFORMATIONWARNING: ANY USE BY YOU OF THE CODE PROVIDED IN THIS ARTICLE IS AT YOUR OWN RISK. Microsoft provides this macro code "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. Use the "FileSaveAll 1" command to save all edited documents automatically without prompting. If the document has never been saved, Word will prompt for a location and name for the document. For example: NOTE: This macro example must be named AutoClose.
Sub Main FileSaveAll 1 End Sub REFERENCES"Using WordBasic," by WexTech Systems and Microsoft Corporation, page 208
|
Additional query words:
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |