Solved

How to count word of microsoft office files?

Posted on 2011-03-14
7
318 Views
Last Modified: 2012-05-11
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
0
Comment
Question by:l0o3
  • 4
  • 2
7 Comments
 
LVL 2

Expert Comment

by:niralbhavsar
Comment Utility
0
 

Author Comment

by:l0o3
Comment Utility
niralbhavsar i need web application code and sample

this is learning of microsoft word
0
 
LVL 19

Expert Comment

by:Shahan Ayyub
Comment Utility
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).
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:l0o3
Comment Utility
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
0
 
LVL 19

Accepted Solution

by:
Shahan Ayyub earned 500 total points
Comment Utility
Did you use this??

Word.ApplicationClass WordApp = new Word.ApplicationClass(); 

Open in new window


Also, write:
Imports Microsoft.Office.Interop

Open in new window


Also Try using with full reference i have used this interop before.
0
 

Author Comment

by:l0o3
Comment Utility
WordApp.Documents.Open

Open in new window

WordApp not found

this code not run in web, only for windows application
0
 

Author Closing Comment

by:l0o3
Comment Utility
thank you
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now