Document.Close procedure builder

Document.Close (Word)

Closes the specified document.

Close (SaveChanges, OriginalFormat, RouteDocument)

On Error GoTo errorHandler 
ActiveDocument.Close _ 
 SaveChanges:=wdPromptToSaveChanges, _ 
 OriginalFormat:=wdPromptUser 
errorHandler: 
If Err = 4198 Then MsgBox "Document was not closed"

Arguments

Optional arguments

The following arguments are optional

SaveChanges - Specifies the save action for the document. Can be one of the following WdSaveOptions constants: wdDoNotSaveChanges, wdPromptToSaveChanges, or wdSaveChanges

OriginalFormat - Specifies the save format for the document. Can be one of the following WdOriginalFormat constants: wdOriginalDocumentFormat, wdPromptUser, or wdWordDocument

RouteDocument - True to route the document to the next recipient. If the document does not have a routing slip attached, this argument is ignored