![]() |
#6
|
||||
|
||||
![]()
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] |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Retrieving deleted data | charles | Outlook | 0 | 12-23-2012 10:58 PM |
Easy send/save Excel data to Database Table or Stored Procedure | TonyHarvard | Excel | 3 | 07-11-2012 12:43 PM |
Retrieving content control value | jillapass | Word VBA | 4 | 05-24-2012 05:07 AM |
![]() |
RSchmidt | Word | 1 | 07-14-2011 04:27 PM |
Using data entered in prompt to search database table | BluRay | Word | 1 | 03-25-2011 01:47 AM |