Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to count word of microsoft office files?

Posted on 2011-03-14
7
Medium Priority
?
336 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 

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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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 2000 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

604 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