Link to home
Start Free TrialLog in
Avatar of l0o3
l0o3

asked on

How to count word of microsoft office files?

Hi guys

i need count word in office software

for ex:
count word of [.doc , docx , .xls , .ppt , .pdf , .rtf , .html , .txt ] files

i need sample file for count word in files

for web application.


thank you
Avatar of niralbhavsar
niralbhavsar

Avatar of l0o3

ASKER

niralbhavsar i need web application code and sample

this is learning of microsoft word
Avatar of Shahan Ayyub
Hi!

This can be work for MSWord:
http://www.codeproject.com/KB/cs/mswordcount.aspx

Here you need to use:
Microsoft.Office.Interop.Word.WdStatistic.wdStatisticWords   ' Count Words
instead of:
Microsoft.Office.Interop.Word.WdStatistic.wdStatisticPages    ' Count pages

Moreover, Excel Interop should do excel reading job and same with the case of PowerPoint ".ppt" file.

If you want to read ".pdf" then "iTextsharp.dll" might help you(which is special for pdf manipulation).
Avatar of l0o3

ASKER

Shahan i have error in this
WordApp.Documents.Open(

Open in new window

WordApp not found

what's this?

i have added .NET>Microsoft.Office.Interop

but error
ASKER CERTIFIED SOLUTION
Avatar of Shahan Ayyub
Shahan Ayyub
Flag of Pakistan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of l0o3

ASKER

WordApp.Documents.Open

Open in new window

WordApp not found

this code not run in web, only for windows application
Avatar of l0o3

ASKER

thank you