Microsoft Word Suite
325
Command: save as
Saves the specified document with a new name or format. The arguments for this method
correspond to the options in the Save As dialog box (File menu).
Syntax
save as document Required. An expression that returns a document object.
[file name Unicode text] Optional. The name for the document. The default is the current folder
and file name. If the document has never been saved, the default name is used (for example,
Doc1.doc). If a document with the specified file name already exists, the document is
overwritten without the user being prompted first.
[file format enumeration] Optional. The format in which the document is saved. Can be one of
the following: format custom dictionary, format document, format dostext, format dostext
line breaks, format exclude dictionary, format rtf, wdFormatStationery, format template,
format text, format text line breaks, format stationery, format web archive, format HTML, or
format unicode text. To save a document in another format, specify the appropriate value for
the save format property of the file converter object.
[lock comments Boolean] Optional. True to lock the document for comments.
[password Unicode text] Optional. A password string for opening the document.
[add to recent files Boolean] Optional. True to add the document to the list of recently used files
on the File menu.
[write password Unicode text] Optional. A password string for saving changes to the
document.
[read only recommended Boolean] Optional. True to have Word suggest readonly status
whenever the document is opened.
[embed truetype fonts Boolean] Optional. True to save TrueType fonts with the document.
[save native picture format Boolean] Optional. If graphics were imported from another
platform, true to save only the Windows version of the imported graphics.
[save forms data Boolean] Optional. True to save the data entered by a user in a form as a data
record.
[HTML display only output Boolean] Optional. True to save only file information that can be
displayed in HTML in a Web browser. Any document options that can't be displayed in a Web
browser will be lost.
Example
This example saves the active document as Test.rtf in rich-text format (RTF).
save as active document file name "Test.rtf" file format format rtf
This example saves MyDoc.doc with a write password and then closes the document.
save as document "MyDoc.doc" write password "pass"
close document "MyDoc.doc"