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!

How can I access a word document's title thro' VB?

Status
Not open for further replies.

mappan

Programmer
Apr 25, 2001
1
0
0
US
I need to access all the titles, subject, Authors of some word documents. How can I accomplish this using VB code?

Thanks.
 
You should be able to use of these. If you are using VB, not VBA, then you will have to reference the Word Object
Code:
ThisDocument.Name
ActiveDocument.Name

wdApp.ThisDocument.Name
wdApp.ActiveDocument.Name
Hope this helps!
 
Asuming Word is running and you have a reference to Microsoft Word 8.0 Object Library in your VB project references:

Code:
debug.print ActiveDocument.BuiltInDocumentProperties("Subject").value

debug.print ActiveDocument.BuiltInDocumentProperties("Author").value

.... etc

HTH

John Whyte
jwhyte@skipton.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top