Export (0) Print
Expand All
Expand Minimize

Document.Save Method

Office 2007
Saves all the documents in the Documents collection.

Syntax

expression.Save(NoPrompt, OriginalFormat)

expression   Required. A variable that represents a Document object.

Parameters

NameRequired/OptionalData TypeDescription
NoPromptOptionalVariantTrue to have Word automatically save all documents. False to have Word prompt the user to save each document that has changed since it was last saved.
OriginalFormatOptionalVariantSpecifies the way the documents are saved. Can be one of the WdOriginalFormat constants.

Remarks

If a document has not been saved before, the Save As dialog box prompts the user for a file name.

Example

This example saves the active document if it has changed since it was last saved.

Visual Basic for Applications
If ActiveDocument.Saved = False Then ActiveDocument.Save

This example saves each document in the Documents collection without first prompting the user.

Visual Basic for Applications
Documents.Save NoPrompt:=True, _
    OriginalFormat:=wdOriginalDocumentFormat



Community Additions

ADD
Show:
© 2015 Microsoft