View Single Post
  #2   Report Post  
Posted to microsoft.public.word.tables
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Cell entry based on selection in dropdown list

If you create each sentence as an autotext entry, the name for which you
have listed in the dropdown list, you could use:

' Macro created 15-11-97 by Doug Robbins to add the address corresponding to
a drop down name
'
Dim Company as String, Address as String
Dim myDrop as DropDown

Set myDrop = ActiveDocument.FormFields("Dropdown1").DropDown
Company = myDrop.ListEntries(myDrop.Value).Name
Address = ActiveDocument.AttachedTemplate.AutoTextEntries(Co mpany).Value
ActiveDocument.FormFields("Text1").Result = Address

There are of course other ways in which the sentences could be stored.

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

"jcachat" wrote in message
...
I have a dropdown list in a cell (row 1, column1). I want to populate
another
cell (row 1, column 2) in the table with different sentences based on my
selection in the dropdown list. How woul I do this. I am not a programmer
but
am willing to learn.