Save Method
Home Page (Objects) | Overview | FAQ | Reference
Applies to: Document object, TextDocument object
Saves a document to a file.
Syntax
object**.Save (** [FullName][**,**PromptUser] )
Parameters
object
An expression that evaluates to a Document object or a TextDocument object.
FullName
(Optional) A Variant that is a String specifying the full path to the file in which you want to save the document. If you omit the name, it defaults to the name specified by the FullName property.
PromptUser
(Optional) A Variant that is a Boolean indicating whether to prompt the user to save changes. Possible values are:
True Prompts the user to save changes. If the user chooses not to save changes, Save returns the enum dsSaveStatus with the value dsSaveSucceeded; otherwise Save returns dsSaveStatus with the value dsSaveCanceled.
False Does not prompt the user (the default).
Return Values
The Save method returns the enum dsSaveStatus, which has one of the following values:
dsSaveCanceled Indicates that the user chose not to save changes to the document.
dsSaveSucceeded Indicates that the user saved changes to the document.
Example
The following example saves a document to "C:\Document\Mydoc.txt":
ActiveDocument.Save ("c:\document\mydoc.txt")