Retrieve Custom Property

R

rgoubet

I'm trying to figure out how to retrieve the value of a specific custom
property of a document. I know how to retrieve a built-in property:

myTitle = ActiveDocument.BuiltInDocumentProperties(wdPropertyTitle)

Now, how do I do for CustomDocumentProperties where I don't know the
index value of the custom property I'm looking for (e.g., "Document
Number").

Thanks

Raph
 
J

Jean-Guy Marcil

(e-mail address removed) was telling us:
(e-mail address removed) nous racontait que :
I'm trying to figure out how to retrieve the value of a specific
custom property of a document. I know how to retrieve a built-in
property:

myTitle = ActiveDocument.BuiltInDocumentProperties(wdPropertyTitle)

Now, how do I do for CustomDocumentProperties where I don't know the
index value of the custom property I'm looking for (e.g., "Document
Number").

Thanks

Raph

Dim myNumber As String
myNumber = ActiveDocument.CustomDocumentProperties("Document Number")

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
J

Jean-Guy Marcil

(e-mail address removed) was telling us:
(e-mail address removed) nous racontait que :
OK, obvious enough!

Now how silly do I look? :)
LOL

Don't worry, we've all been there!


--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top