Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 169
  • Last Modified:

VB - Counting characters in MS Word including footnote characters?

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.

LooDuck
0
LooDuck
Asked:
LooDuck
1 Solution
 
bobbit31Commented:
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

wdDoc.Close
Set wdDoc = Nothing
wdApp.Quit
Set wdApp = Nothing

0
 
LooDuckAuthor Commented:
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.
0
 
dmangCommented:
http://support.microsoft.com/default.aspx?scid=KB;en-us;q224351

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

 
LooDuckAuthor Commented:
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?
0
 
CleanupPingCommented:
LooDuck:
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?
0
 
bobbit31Commented:
Recommendation: PAQ and refund points
0
 
LooDuckAuthor Commented:
Although nobody post a good answer for my problem with dsofile library, I accept bobbit31's answer as a solution. Thanks! Bye!
0
 
DanRollinsCommented:
Moderator, my recommended disposition is:

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

DanRollins -- EE database cleanup volunteer
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now