Document.SaveAs2 (Word)

Saves the specified document with a new name or format. Some of the arguments for this method correspond to the options in the Save As dialog box (File tab).

SaveAs2 (FileName, FileFormat, LockComments, Password, AddToRecentFiles, WritePassword, ReadOnlyRecommended, EmbedTrueTypeFonts, SaveNativePictureFormat, SaveFormsData, SaveAsAOCELetter, Encoding, InsertLineBreaks, AllowSubstitutions, LineEnding, AddBiDiMarks, CompatibilityMode)


Sub SaveAsRTF() 
    ActiveDocument.SaveAs2 FileName:="Text.rtf", _ 
        FileFormat:=wdFormatRTF 
End Sub

Arguments

Optional arguments

The following arguments are optional

FileName (String) - 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 prompting the user.

FileFormat (FileConverter) - The format in which the document is saved. Can be any WdSaveFormat constant. To save a document in another format, specify the appropriate value for the SaveFormat property of the FileConverter object.

LockComments (Boolean) - True to lock the document for comments. The default is False.

Password (String) - A password string for opening the document. (See Remarks below.).

AddToRecentFiles (Boolean) - True to add the document to the list of recently used files on the File menu. The default is True.

WritePassword (String) - A password string for saving changes to the document. (See Remarks below.).

ReadOnlyRecommended (Boolean) - True to have Microsoft Word suggest read-only status whenever the document is opened. The default is False.

EmbedTrueTypeFonts (Boolean) - True to save TrueType fonts with the document. If omitted, the EmbedTrueTypeFonts argument assumes the value of the EmbedTrueTypeFonts property.

SaveNativePictureFormat (Boolean) - If graphics were imported from another platform (for example, Macintosh), True to save only the Microsoft Windows version of the imported graphics.

SaveFormsData (Boolean) - True to save the data entered by a user in a form as a record.

SaveAsAOCELetter (Boolean) - If the document has an attached mailer, True to save the document as an AOCE letter (the mailer is saved).

Encoding (String) - The code page, or character set, to use for documents saved as encoded text files. The default is the system code page. You cannot use all MsoEncoding constants with this parameter.

InsertLineBreaks (Boolean) - If the document is saved as a text file, True to insert line breaks at the end of each line of text.

AllowSubstitutions (Boolean) - If the document is saved as a text file, True allows Word to replace some symbols with text that looks similar. For example, displaying the copyright symbol as (c). The default is False.

LineEnding (WdLineEndingType) - The way Word marks the line and paragraph breaks in documents saved as text files. Can be one of the following WdLineEndingType constants: wdCRLF (default) or wdCROnly.


Possible values are

wdCRLF Carriage return plus line feed.
wdCROnly Carriage return only.
wdLFCR Line feed plus carriage return.
wdLFOnly Line feed only.
wdLSPS Not supported.

AddBiDiMarks (Boolean) - True adds control characters to the output file to preserve bi-directional layout of the text in the original document.

CompatibilityMode (WdCompatibilityMode) - The compatibility mode that Word uses when opening the document. WdCompatibilityMode constant.Important By default, if no value is specified for this parameter, Word enters a value of 0, which specifies that the current compatibility mode of the document should be retained.


Possible values are

wdCurrent Compatibility mode equivalent to the latest version of Word.
wdWord2003 Word is put into a mode that is most compatible with Word 2003. Features new to Word are disabled in this mode.
wdWord2007 Word is put into a mode that is most compatible with Word 2007. Features new to Word are disabled in this mode.
wdWord2010 Word is put into a mode that is most compatible with Word 2010. Features new to Word are disabled in this mode.
wdWord2013 Default. All Word features are enabled.