Custom Document Properties

D

Dallas

Hey all,

I'd like to use the custom document properties to automate records for a
medical practice on things that don't change often. I'd like to set up a user
form to enter the data all at once rather than manually tab through the
properties one at a time. I can programmatically set the properties:

Sub CustomDocumentProperties()

With ActiveDocument.CustomDocumentProperties
.Add Name:="Allergies", _
LinkToContent:=False, _
Type:=msoPropertyTypeString, _
Value:="None"
.Add Name:="Meds", _
LinkToContent:=False, _
Type:=msoPropertyTypeString, _
Value:="Aspirin"
.Add Name:="Diagnosis", _
LinkToContent:=False, _
Type:=msoPropertyTypeString, _
Value:="Low Back Pain"

End With
End Sub

but I'm stuck on how to get it from a form. Thanks for any suggestions
 
D

Doug Robbins - Word MVP

I would suggest that you make use of a user form

See the article "How to create a Userform" at:

http://word.mvps.org/FAQs/Userforms/CreateAUserForm.htm

and I would use Document Variables rather than Custom Document Properties.
However, the code you have now would be used in a command button event on
the userform to create those properties.


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

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