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

DOCPROPERTY in Word

Status
Not open for further replies.

29466999

Programmer
Nov 22, 2002
13
DK
What should I do, if I want to change some of the DOCPROPERTY's in word.
 
I'm assuming you are trying to insert either the BuiltInDocumentProperties or CustomDocumentProperties into fields placed in a document.

The correct syntax to place DocumentProperties into document fields is - { DOCPROPERTY "Name"} - where "Name" is the name of either one of the BuiltInDocumentProperties or CustomDocumentProperties that you may have created.

E.G.
From the Insert menu:
select field...
from the Categories: list box choose
Document Information
then from the Field Names: list box choose
DocProperty

In the textbox below both list boxes enter the name of the field desired enclosed in quotes.
i.e. "Author" for the document's Author or "My Custom Field" if you had created a custom field with that name.

Press the "OK" button and the field will show in the document.

There's a hell of a lot more, but this should get you started - I guess...

To use these items in other modes (i.e. program code) you have to understand a lot more about Word's object model.

Hope helps,

Darrell
'We all must do the hard bits so when we get bit we know where to bite' :)
 
Hey Darrell,

It was the BuiltInDocumentProperties keyword I was looking for, and by using that, I could solve my problem in VBA. Thank you.

Best regards

Morten

Denmark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top