Obtaining Word Count -.NET

F

FoxWiz

Using .NET (C#)

I'm trying to retrieve the actual word count in a Word document - as displayed on the Statistics tab of the Properties dialog. A test document has 23,155 words in it, but the MyDocObject.Words.Count value is in excess of 55,000. Apparently, I'm not referencing the correct object/property. Any ideas?

Also, any recommendations on references for advanced Word object model programming? I'd like to be able to interrogate the "Type" value on the General tab of the Properties dialog

Thank

Dan
 
F

FoxWiz

I figured it out -- thanks anyway

int liWordCount = oDocument.ComputeStatistics(Word.WdStatistic.wdStatisticWords,ref loFalse) ;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top