Solved

How to count word of microsoft office files?

Posted on 2011-03-14
7
319 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
ID: 35130399
0
 

Author Comment

by:l0o3
ID: 35130427
niralbhavsar i need web application code and sample

this is learning of microsoft word
0
 
LVL 19

Expert Comment

by:Shahan Ayyub
ID: 35141288
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:l0o3
ID: 35143201
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
ID: 35147098
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
ID: 35147533
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
ID: 35148107
thank you
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
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.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

929 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

21 Experts available now in Live!

Get 1:1 Help Now