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
Doug Robbins - Word MVP - 29 Oct 2007 07:27 GMT
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.

Signature
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
> Hey all,
>
[quoted text clipped - 24 lines]
>
> but I'm stuck on how to get it from a form. Thanks for any suggestions