Saving a .doc as .docx without maintaining compatibility with Word

K

Kranthi

I want to programmatically convert .doc files to .docx format. In SaveAs
dialog "Maintain compatibility with Word 97-2003" checkbox is checked by
default and when I writing code in VBA, I could not find any way to uncheck
this option.

How can I convert .doc to .docx without maintaining this compatibility?

I tried setting the flag Document.OptimizeForWord97 = false and then saving
the document. But it does not seem to work.

Thanks
Kranthi
 
P

Peter Jamieson

Assuming you're using Word 2007, have you tried using

Activedocument.SaveAs FileName:="something.docx",
FileFormat:=wdFormatXMLDocument

Peter Jamieson
 
K

Kranthi

I am using Word 2007 and I am setting file format as wdFormatXMLDocument.

Problem here is, whatever documents in .doc format that I have are having
compatibiity mode set. When I save them to .docx, compatibility is still set.

I need a way to unset compatibility with Word 97-2003 while saving as .docx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top