View Single Post
 
Old 11-08-2013, 04:55 AM
macropod's Avatar
macropod macropod is offline Windows 7 32bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,365
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

It could be done via a selection_change macro, but that would run every time you change the selection (i.e. you type all or part of a name, then select what you've typed). But then there's the question of preventing the macro from updating the document before you'd finished selecting, say, a two word name, and updating after only the first word has been selected.

A better way would be to populate a dropdown with the list of doctors, then choose from that list. For some code to do that, see: https://www.msofficeforums.com/word-...html#post46287. Ideally, that code would reside in the document's template. Some extra work would be required to retrieve the address data as well and to output the chosen set into your document. You might also want to delete the content control upon saving, so the extra data associated with it wouldn't remain in the document.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote