Article ID: 170352
Article Last Modified on 1/20/2007
Public Sub AutoClose()
' If the document you are closing requires saving due
' to changes...
If ActiveDocument.Saved = False Then
' Save the document without prompting.
ActiveDocument.Save
End If
End Sub
For more information about saving documents, from the Visual Basic for
Applications Editor, click the Office Assistant, type save document, click Search, and then click to view the
"Save Method" topic.
120802 Office: How to Add/Remove a Single Office Program or Component
163435 VBA: Programming Resources for Visual Basic for Applications
Additional query words: wordcon vb vba vbe
Keywords: kbcode kbhowto kbmacroexample kbprogramming KB170352