Reputation: 1524
I want to read a docx File in c#. the docx file when converted to .zip generate the xml of our file. I want to read that xml file . I need all the data from the doc with ther font name (bold italic setting), color from the file. How can we do this?
Upvotes: 1
Views: 3613
Reputation: 84804
Low level answer: DOCX files are OPC (Open Packaging Conventions) format (zip files with a manifest) and can be opened with the classes available in the System.IO.Packaging
namespace.
High level answer: DocX is an opensource framework that supports manipulating DOCX files using higher level constructs.
Upvotes: 4
Reputation: 1770
If you're able to read the file as XML then may be you could apply some XPATH queries to get the info you need.
Upvotes: 0
Reputation: 60276
The format of DOCX is well documented. To read the packages, you can use the classes from the System.IO.Packaging
namespace.
Upvotes: 3