_Document.SaveAs2(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object) 方法

定义

使用新的名称或格式保存指定的文档。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).

public void SaveAs2 (ref object FileName, ref object FileFormat, ref object LockComments, ref object Password, ref object AddToRecentFiles, ref object WritePassword, ref object ReadOnlyRecommended, ref object EmbedTrueTypeFonts, ref object SaveNativePictureFormat, ref object SaveFormsData, ref object SaveAsAOCELetter, ref object Encoding, ref object InsertLineBreaks, ref object AllowSubstitutions, ref object LineEnding, ref object AddBiDiMarks, ref object CompatibilityMode);
abstract member SaveAs2 : obj * obj * obj * obj * obj * obj * obj * obj * obj * obj * obj * obj * obj * obj * obj * obj * obj -> unit
Public Sub SaveAs2 (Optional ByRef FileName As Object, Optional ByRef FileFormat As Object, Optional ByRef LockComments As Object, Optional ByRef Password As Object, Optional ByRef AddToRecentFiles As Object, Optional ByRef WritePassword As Object, Optional ByRef ReadOnlyRecommended As Object, Optional ByRef EmbedTrueTypeFonts As Object, Optional ByRef SaveNativePictureFormat As Object, Optional ByRef SaveFormsData As Object, Optional ByRef SaveAsAOCELetter As Object, Optional ByRef Encoding As Object, Optional ByRef InsertLineBreaks As Object, Optional ByRef AllowSubstitutions As Object, Optional ByRef LineEnding As Object, Optional ByRef AddBiDiMarks As Object, Optional ByRef CompatibilityMode As Object)

参数

FileName
Object

文档的名称。默认值为当前文件夹和文件名。如果从未保存过文档,将使用默认名称(例如,Doc1.doc)。如果已经存在具有指定文件名的文档,将覆盖该文档,而不提示用户。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
Object

文档的保存格式。The format in which the document is saved. 可以是任何 WdSaveFormat 常量。Can be any WdSaveFormat constant. 若要将文档保存为其他格式,请为该对象的属性指定适当的值 SaveFormat FileConverterTo save a document in another format, specify the appropriate value for the SaveFormat property of the FileConverter object.

LockComments
Object

如果为 true,则锁定文档以进行批注;否则为 falsetrue to lock the document for comments; otherwise false. 默认值为 falseThe default is false.

Password
Object

用于打开文档的密码字符串(请参阅下面的“说明”。A password string for opening the document.

AddToRecentFiles
Object

如果为 true ,则将文档添加到 "文件" 菜单上最近使用的文件列表中;否则为 falsetrue to add the document to the list of recently used files on the File menu; otherwise, false. 默认值为 trueThe default is true.

WritePassword
Object

用于将更改保存到文档的密码字符串(请参阅下面的“说明”。A password string for saving changes to the document.

ReadOnlyRecommended
Object

如果在打开文档时,Microsoft Word 建议只读状态,则为 true; 否则为 false。否则为 falsetrue to have Microsoft Word suggest read-only status whenever the document is opened; otherwise, false. 默认值为 falseThe default is false.

EmbedTrueTypeFonts
Object

如果为 true ,则将 TrueType 字体与文档一起保存;否则为 falsetrue to save TrueType fonts with the document; otherwise, false. 如果省略此参数,则该 EmbedTrueTypeFonts 参数假定属性的值 EmbedTrueTypeFontsIf omitted, the EmbedTrueTypeFonts parameter assumes the value of the EmbedTrueTypeFonts property.

SaveNativePictureFormat
Object

如果图形是从其他平台(如 Macintosh)导入的,则为 true ,仅保存导入图形的 Microsoft Windows 版本。If graphics were imported from another platform (for example, Macintosh), true to save only the Microsoft Windows version of the imported graphics.

SaveFormsData
Object

如果为 true ,则将窗体中的用户输入的数据保存为记录;否则为 falsetrue to save the data entered by a user in a form as a record; otherwise, false.

SaveAsAOCELetter
Object

如果文档包含附加的邮件,则为 true以将文档另存为 AOCE 信函(保存邮件)。If the document has an attached mailer, true to save the document as an AOCE letter (the mailer is saved).

Encoding
Object

用于另存为编码文本文件的文档的代码页或字符集。The code page, or character set, to use for documents saved as encoded text files. 默认为系统代码页。The default is the system code page. 您不能将所有 MsoEncoding 常量与此参数一起使用。You cannot use all MsoEncoding constants with this parameter.

InsertLineBreaks
Object

将文档保存为文本文件时,如果为true,则在每一行文本的末尾插入换行符。If the document is saved as a text file, true to insert line breaks at the end of each line of text.

AllowSubstitutions
Object

如果将文档另存为文本文件,则为 true,则允许 Word 将一些符号替换为看上去类似的文本。If the document is saved as a text file, true allows Word to replace some symbols with text that looks similar. 例如,将版权符号显示为 (c)。For example, displaying the copyright symbol as (c). 默认值为 falseThe default is false.

LineEnding
Object

Word 在另存为文本文件的文档中标记换行符和分段符的方式。The way Word marks the line and paragraph breaks in documents saved as text files. 可以是下列 WdLineEndingType 常量之一: wdCRLF (默认值)或F:Microsoft.Office.Interop.Word.WdLineEndingType.wdCROnlyCan be one of the following WdLineEndingType constants: wdCRLF (default) or F:Microsoft.Office.Interop.Word.WdLineEndingType.wdCROnly.

AddBiDiMarks
Object

如果为 true,则在输出文件中添加控制字符,以保留原始文档中文本的双向版式。true adds control characters to the output file to preserve bi-directional layout of the text in the original document.

CompatibilityMode
Object

Word 2010 在打开文档时使用的兼容性模式。The compatibility mode that Word 2010 uses when opening the document. WdCompatibilityMode间断.WdCompatibilityMode constant.

适用于