jtaylerg
asked on
VBA Word 2003 - How do you add and retrieve custom doc properties
Hello,
I have a word template that has a dialog box attached in which the user enters information to generate the document. I would like to take the text field info and attach it to the document properties. Later, I want the user to be able to run a different macro -- which will pull that document property information into the new macros dialog box. (Trying to avoid the user having to enter the same information twice.)
I'm open to any other suggestions for storing the data if doc properties is not the way to go.. Either way, can you tell me how to do this?
Thank you so much! ~JTG
I have a word template that has a dialog box attached in which the user enters information to generate the document. I would like to take the text field info and attach it to the document properties. Later, I want the user to be able to run a different macro -- which will pull that document property information into the new macros dialog box. (Trying to avoid the user having to enter the same information twice.)
I'm open to any other suggestions for storing the data if doc properties is not the way to go.. Either way, can you tell me how to do this?
Thank you so much! ~JTG
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks Chris,
I need to play with it some more -- but I think it's working thus far.
Have a great week -- JTG
I need to play with it some more -- but I think it's working thus far.
Have a great week -- JTG
Function CustPropExists(str_Propert
Dim doc_Property As DocumentProperty
CustPropExists = False
For Each doc_Property In ActiveDocument.CustomDocum
If LCase(doc_Property.Name) = LCase(str_Property_Name) Then
CustPropExists = True
Exit For
End If
Next doc_Property
End Function