I'm not sure it's possible to explain the way Word thinks, in layman's terms or
any other terms! ;-)
The dropdown form field, besides requiring protection for forms and having a
limited capacity, doesn't fire a macro or any other kind of event when the user
changes the choice in the list. Nothing happens until the user exits the field
by tabbing or clicking, and then only if you've designated an exit macro.
Technically, there is a way to do what you ask, but I'm reluctant to recommend
it.
Besides the dropdown form field, there is another type of dropdown you can put
into the body of a document -- a combo box ActiveX control that you can get from
the Control Toolbox (one of the toolbars on the View > Toolbars menu). This kind
of control is described at
<
http://msdn2.microsoft.com/en-us/library/aa140269(office.10).aspx>. If, after
reading the section about "Appropriateness for the Task", you still want to use
one, you need these hints:
- By default, users can type anything into the edit box at the top of the combo
box control. To force them to choose only from the presented list of items, you
must click the Properties button on the Control Toolbox and set the combo box's
MatchRequired property to True.
- The code that inserts the necessary file could be placed in the combo box's
Change procedure. To get there, while the combo box is selected, click the View
Code button on the Control Toolbox. Across the top of the VBA editing window,
you should see the combo box's name on the left and "Change" on the right; in
the window you should see an empty procedure with a name like
ComboBox1_Change().
- The problem with using the Change procedure is that if the user repeatedly
changes the combo box selection, the Change procedure will fire each time,
putting multiple files into the document. You would need to arrange that each
insertion first removes any previous insertion, possibly by overwriting the
range of a bookmark. (To make that work you need to read
http://www.word.mvps.org/FAQs/MacrosVBA/InsertingTextAtBookmark.htm.)
An alternative is to use the LostFocus procedure, which executes only when the
user clicks or tabs away (same as the exit macro of a dropdown form field). Of
course, since the user could go into and out of the combo box repeatedly, you
still need to provide a way to remove the preceding choice of text to prevent
them from piling up.