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

All user difened fields in Word document

Status
Not open for further replies.

fiep

Technical User
Sep 2, 2003
66
NL
Hi,

I am trying to fill a list with all user defined fields in a word document. If I loop through the activedocument.fields I only see the fields that have been added in the document text. I also want to list all fields that have been created in File --> properties --> custom and that have not yet been added to the document text.

How can I list these field(names)?

Thanks.

W.
 
Hi fiep,

Word hasn't (yet) got a crystal ball; it doesn't know what you're going to add to the document in the future :)

Custom document properties are available via the Document.CustomDocumentProperties collection.

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
Excel VBA Training and more Help at VBAExpress[
 
Hi,

Thanks TonyJollans. I took a look at the property but the user added fields do not seem to be part of this object.

And I did not mean that MS would no before hand how the fields are going to named. The user can add fields in the document properties without adding these fields to the actual text. I want to list all fields created already by the user not the once to be created in the future. ;-)

So the issue is still open, anyone?

W.

 
Hi fiep,

Well, they're all there for me! AFAIK that's the only place they exist, so I don't know how to help further. Sorry!

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
Excel VBA Training and more Help at VBAExpress[
 
TonyJollans,

I took some more time to dive into the problem and you are correct the fields are added to this collection.

Thanks for the help.

W.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top