1

I'm working on Visual Basic 2010 Express, and I am looking for a way to count the total word number of an MS Word document (.doc or .docx) from my application.

In fact, I found several ways to do that, but all of them require my application to open the word file, which is not always possible in my case.

Is there any way to get this MS Word file detail without opening it ?

Would you please suggest me a way to get this done?

Thank you in advance.

  • 1
    Well, to access the content in any file you need to open it. Do you mean without opening it in the Word application? The content of a Word file can be accessed via the Open XML file format, without needing the Word application. I believe the number of pages is stored in a property, if the file saved correctly from within the Word application, but that count may not be completely accurate. You'll find the basic syntax in http://stackoverflow.com/questions/12339553/how-to-programatically-c-determine-the-pages-count-of-docx-files – Cindy Meister Apr 07 '16 at 18:45
  • Thank you for your kind reply. Yes I mean without opening the Word Application. As you said, the count isn't really accurate. – Rashedkoutayni Apr 20 '16 at 15:12

0 Answers0