Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Where to find WORD.APPLICATION methods/properties

Status
Not open for further replies.

No1MrEd

Programmer
Oct 12, 2001
6
0
0
US
I am trying to convert a Word.basic VB program to Word.Application. From Word6 to word2000 and I cannot find the methods and properties for word2000. Seems like it should be in the help files that come with word2000, but I have been looking there and not having any luck.

Specifically, I am looking to find out how many characters are in an open document, and if the document has been changed since the last time it was saved.
 
MsgBox "Characters: " & ActiveDocument.BuiltInDocumentProperties("Number of Characters") & vbCrLf & "Saved: " & ActiveDocument.Saved

The Saved property returns whether the document has been changed since the last time it was saved.

Note that BuiltInDocumentProperties("Number of Characters") returns the number of characters in the main text part of the document (i.e. not counting those in headers, footers, footnotes, etc.)

If you need to count also the number of characters in the headers, footers, footnotes, etc. you'll have to loop through all 'StoryRanges' then use the .Characters.Count property of each 'StoryRange'
 
Thanks, Justin. That is what I needed.

John, I looked at your reference but could not find how to do the number of characters?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top