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

[email protected] was telling us:
[email protected] 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
[email protected]
Word MVP site: http://www.word.mvps.org
 
Top