ActiveDocument.SaveAs FileName:="Test.docx", FileFormat:= _
wdFormatXMLDocument, LockComments:=False, Password:="",
AddToRecentFiles _
:=True, WritePassword:="", ReadOnlyRecommended:=False,
EmbedTrueTypeFonts _
:=False, SaveNativePictureFormat:=False, SaveFormsData:=False, _
SaveAsAOCELetter:=False
ActiveDocument.Convert 'Required if not Word 2007 format
编辑:
VBA 代码也被存储。如果你想防止这种情况发生,你能做的最好的就是将你的文本移动到一个新文档中并保存这个文档。
简单的例子,基于书签的存储:
Option Explicit
Sub Save_Doc_NoMacros()
Dim ThisDoc As Word.Document
Dim oDoc As Word.Document
Set ThisDoc = ActiveDocument
ThisDoc.Bookmarks("Bookmark1").Select
Selection.Copy
Set oDoc = Documents.Add
Selection.Paste
oDoc.SaveAs FileName:="U:/Text.docx", FileFormat:=wdFormatDocument
oDoc.Close
End Sub