Click here to Skip to main content
15,392,442 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

How to get no of character in a word document without opening using ?

Thanks all

1 solution


Unless you open the file in some way, you cannot tell how many words it contains.

It's like a letter being delivered to you. Unless you open the envelope, you can't be sure exactly what the contents say.
Asutosha 8-Feb-12 5:09am

but in my existing system it is opening the word document and counting the number of charatcter, and it is slow for more file.

I need to increase the performance of the application by not opening the file and get no of character..

please suggest in or c#
OriginalGriff 8-Feb-12 5:17am
You can't. You can get the number of bytes in the file, but that includes a lot of packaging that the word document requires to specify formatting, fonts, pages, layout and so forth.
The only way to get the number of actual characters in the word document is to open the file.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900