Link to home
Start Free TrialLog in
Avatar of stephi01
stephi01

asked on

Office Open XML file <file_name> cannot be opened

I create a docx file.
Type "This is a test"
save as test.docx
rename to test.zip
extract to folder called test
compress folder as test.zip
rename to test.docx

When I open the file I recieve "Office Open XML file <file_name> cannot be opened because there are problems with it's contents. "
    Error Details says "the file is corrupt and cannot be opened.

Any ideas on what i am doing incorrectly or how to resolve it?

Avatar of merowinger
merowinger
Flag of Germany image

why do that? :)
Do you want to zip the document? This is not possible by renaming it to .zip
Avatar of stephi01
stephi01

ASKER

I have an app that uses a custom xml to input data into my doc via content controls. Unfortunately the info in the controls will not update when the xml data is updated.
Unless someone can suggest a better way I am trying to have the app create the custom xml in a directory that also contains the word doc info then compress that directory to rename it .docx.
The app would be recreating the doc everytime with updated info.
Do not extract the files after renamed it to zip
you have to change your settings directly in the zip folder!
ASKER CERTIFIED SOLUTION
Avatar of dlc110161
dlc110161
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
perfect! Thanks!