VB - Counting characters in MS Word including footnote characters?

Posted on 2003-02-20
Medium Priority
Last Modified: 2008-02-26
Can anybody help me with the problem with counting characters in MS Word using Visual Basic? I have made an application which counts characters in MS Word file, but it doesn't count characters in footnote. Please help.

Question by:LooDuck
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
LVL 18

Accepted Solution

bobbit31 earned 400 total points
ID: 7988821
this should work:

Dim wdApp As New Word.Application
Dim wdDoc As Word.Document

Set wdDoc = wdApp.Documents.Open("C:\my documents\test.doc")

MsgBox wdDoc.ComputeStatistics(wdStatisticCharacters, True) '' the true means include footnotes and endnotes

Set wdDoc = Nothing
Set wdApp = Nothing


Author Comment

ID: 8004941
Yes, I know that. But Im using Microsoft library dsofile.dll. Using that library, you dont have to open Word each time to see statistics. It makes application works faster. The problem is that I dont know how to count characters in footnotes using that library.

If you find or know anything about that, please answer here.

Thanks anyway.

Expert Comment

ID: 8025975

This page will provide a demo app that returns a whole bunch of stuff about your document files
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!


Author Comment

ID: 8031981
Yes, that exactly the library which Im already using. But, I can't count the number of characters in footnotes. Does anybody knows any other dll which could be useful for that?

Expert Comment

ID: 8901360
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Experts: Post your closing recommendations!  Who deserves points here?
LVL 18

Expert Comment

ID: 8902998
Recommendation: PAQ and refund points

Author Comment

ID: 8906307
Although nobody post a good answer for my problem with dsofile library, I accept bobbit31's answer as a solution. Thanks! Bye!
LVL 49

Expert Comment

ID: 8963971
Moderator, my recommended disposition is:

    Accept bobbit31's comment(s) as an answer.

DanRollins -- EE database cleanup volunteer

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month9 days, 17 hours left to enroll

762 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