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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accessing Word Properties

Status
Not open for further replies.

sandylou

Programmer
Jan 18, 2002
147
US
I have the following code in which I want the filename and the BuiltinDocumentProperty("Comments") value. I can get the filename but can't get the builtinDocumentProperty. ANY help?


Dim fs, objFolder, filecollection, i, filename, intComments, myDoc
Dim Doc As Document

Set fs = CreateObject("Scripting.FileSystemObject")
Set objFolder = fs.GetFolder("c:\WUTEMP")
Set filecollection = objFolder.Files

For Each filename In filecollection
i = i + 1
MsgBox filename
Doc.BuiltInDocumentProperties("Comments") = intComments
MsgBox intComments
Next
 
Here are some of the BuiltInDocumentProperties(Index) values.

Title = 1
Subject = 2
Author = 3
Keywords = 4
Comments= 5
Template = 6
Last author = 7
Revision number = 8
Application name = 9
Last Print date = 10
Number of words = 15
Number of lines = 23

Number of bytes = 22 for those who really want to know?
Number of characters (with spaces) = 30

blah blah
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top