I recorded two macros of the process of using the FileSaveAs command to
save two .doc documents as .docx documents. With one I selected to maintain
compatibily. The file was saved in the .docx format with the compatibility
flag. With the other I unchecked the option to maintain compatibility and
the file was saved as a .docx file without the compatibility flag.
The recorded results show no difference:
Sub Macro1()
ActiveDocument.SaveAs FileName:="Test Doc 1.docx", FileFormat:= _
wdFormatXMLDocument, LockComments:=False, Password:="", AddToRecentFiles
_
:=True, WritePassword:="", ReadOnlyRecommended:=False,
EmbedTrueTypeFonts _
:=False, SaveNativePictureFormat:=False, SaveFormsData:=False, _
SaveAsAOCELetter:=False
End Sub
Sub Macro(2)
ActiveDocument.SaveAs FileName:="Test Doc 2.docx", FileFormat:= _
wdFormatXMLDocument, LockComments:=False, Password:="", AddToRecentFiles
_
:=True, WritePassword:="", ReadOnlyRecommended:=False,
EmbedTrueTypeFonts _
:=False, SaveNativePictureFormat:=False, SaveFormsData:=False, _
SaveAsAOCELetter:=False
End Sub
How to save a .doc to .docx using VBA and remove the compatibility flag.
Thanks.
--
Greg Maxey - Word MVP
My web site http://gregmaxey.mvps.org
Word MVP web site http://word.mvps.org
Sub Macro1()
ActiveDocument.SaveAs FileName:="Test Doc 1.docx", FileFormat:= _
wdFormatXMLDocument, LockComments:=False, Password:="",
AddToRecentFiles _
:=True, WritePassword:="", ReadOnlyRecommended:=False,
EmbedTrueTypeFonts _
:=False, SaveNativePictureFormat:=False, SaveFormsData:=False, _
SaveAsAOCELetter:=False
ActiveDocument.Convert 'Added this line.
End Sub