c# - How can I edit and save correct OpenXML docx file? -


i parse document.xml(change file.docx name file.docx.zip , uznip it) file manually , put code:

<w:r>       <w:t>new text</w:t>  </w:r> 

instead of

<w:r>       <w:t>text</w:t>  </w:r> 

and save zip-archieve(and change file.docx.zip name file.docx) , try open docx msword 2013. error word - incorrect document. how fix ? thank you.

why doing manually? used open xml sdk , worked smoothly.

you have access whole xml tree can change want, exception library takes care of zipping , unzipping.

the sdk has viewer can have better @ file, , i've found docx documents have internally multiple files zipped together. maybe missing 1 of them.


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -