G
Greg Maxey
I am trying to convert a batch of .doc files to .docx files using VBA. I
have managed to "physically" convert the files, but all files converted
retain the [Compatibility flag].
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.
have managed to "physically" convert the files, but all files converted
retain the [Compatibility flag].
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.