Closing Documents

Application.ActiveDocument.Close SaveChange:=wdSaveOptions.wdPromptToSaveChanges 

All these arguments are optional
The RouteDocument is optional and can be set to True to route the document to the next recipient
If the document does not have a routing slip attached then this argument is ignored.


Close all Documents without saving

You can use the Documents collection to quickly close all the currently open documents.

Application.Documents.Close SaveChange:=wdSaveOptions.wdDoNotSaveChanges 

Exiting Word

Application.Quit SaveChanges:=wdSaveOptions.wdPromptToSaveChanges 

© 2023 Better Solutions Limited. All Rights Reserved. © 2023 Better Solutions Limited TopPrevNext