View Single Post
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
 
Posts: n/a
Default inserting text from the results of a dropdown box

If this you are talking about a form that uses formfields in a document that
is protected for forms, you can have the text saved as autotext entries and
then use the following to insert the text that corresponds to the item
selected from the dropdown formfield:

' Macro created 15-11-97 by Doug Robbins to add the address corresponding to
a drop down name

'

Set myDrop = ActiveDocument.FormFields("Dropdown1").DropDown

Company = myDrop.ListEntries(myDrop.Value).Name

Address = ActiveDocument.AttachedTemplate.AutoTextEntries(Co mpany).Value

ActiveDocument.FormFields("Text1").Result = Address


--
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

"pmburrow" wrote in message
ups.com...
Can anyone please point me in the direction that I should be going?
I'm using Word 2002. At the beginning of my document I have a form
that when completed fills in the contact information that is required
for a letter and a contract.

I have a drop down box which list several different plans. I would like
to have specific text inserted inside the contract based on the choice
in the dropdown box.

I'm not sure that if the following is correct, but I have tried using
Mail Merge, and placed my data in an excel spreadsheet. I have my
"choice" listed as the column header, with my text located inside
the following cell.

I'm still having problems tying it to the results of the dropdown
box.

Any help would be appreciated. Thanks in advance.

Phillip