Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / October 2007

Tip: Looking for answers? Try searching our database.

Custom Document Properties

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dallas - 29 Oct 2007 05:02 GMT
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

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.