I would like to use NPOI library to get image from Word file (Doc [97-2003]).
I want to HWPFDocument class, but i can not find namespace, where this class is. I write code in c#.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I don’t think you can achieve that using NPOI.
As tonyqus (the guy behind the project) states here and here HWPF is not stable and usable.
I’ve managed to work with MS Word and Excel with “OpenOffice uno SDK“.
It’s not straightforward but after a little bit of struggle you can have great results.
You can read how to extract and use the assemblies here and how to achieve what you’re looking for here.
Of course you can always use MSOffice Interop but you need to install MS Office on the client where the application is executed.
Hope it helps.