?
Solved

How to count word of microsoft office files?

Posted on 2011-03-14
7
Medium Priority
?
330 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

765 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