Reply
 
Thread Tools Display Modes
  #1   Report Post  
blue dog
 
Posts: n/a
Default Can I have multi-line items in a drop down box?

I'm using Word 2002. I want to have a drop down box in my form, but I want
the items you can choose from to be 2 or 3 lines. For example, I'd like to
enter a business name & address for 3 businesses, and have them be in the
drop down box, but when selected, show up as a regular 3-line address.
  #2   Report Post  
Doug Robbins
 
Posts: n/a
Default

You cannot do that, but, if you create an autotext entry for the address of
each company, then run the following macro on exit from the drop down, it
will insert the autotext corresponding to the company selected into the
formfield Text1:

' 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
"blue dog" blue wrote in message
...
I'm using Word 2002. I want to have a drop down box in my form, but I
want
the items you can choose from to be 2 or 3 lines. For example, I'd like
to
enter a business name & address for 3 businesses, and have them be in the
drop down box, but when selected, show up as a regular 3-line address.



  #3   Report Post  
blue dog
 
Posts: n/a
Default

Doug - I'm not following the "macro" instructions.

"Doug Robbins" wrote:

You cannot do that, but, if you create an autotext entry for the address of
each company, then run the following macro on exit from the drop down, it
will insert the autotext corresponding to the company selected into the
formfield Text1:

' 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
"blue dog" blue wrote in message
...
I'm using Word 2002. I want to have a drop down box in my form, but I
want
the items you can choose from to be 2 or 3 lines. For example, I'd like
to
enter a business name & address for 3 businesses, and have them be in the
drop down box, but when selected, show up as a regular 3-line address.




  #4   Report Post  
Doug Robbins
 
Posts: n/a
Default

See the article "What do I do with macros sent to me by other newsgroup
readers to help me out?" at:

http://www.word.mvps.org/FAQs/Macros...eateAMacro.htm

and for more information on forms:

Please Fill Out This Form
Part 1: Create professional looking forms in Word
http://www.computorcompanion.com/LPMArticle.asp?ID=22

Part 2: Adding Automation to your Word forms.
http://www.computorcompanion.com/LPMArticle.asp?ID=46

Part 3: Learn more VBA (macros) to automate your forms.
http://www.computorcompanion.com/LPMArticle.asp?ID=119

Part 4: Use custom dialog boxes in your Word forms
http://www.computorcompanion.com/LPMArticle.asp?ID=127

Part 5: Connect your AutoForm to a database to save input time and keep
better records!
http://www.computorcompanion.com/LPMArticle.asp?ID=136


--
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
"blue dog" wrote in message
...
Doug - I'm not following the "macro" instructions.

"Doug Robbins" wrote:

You cannot do that, but, if you create an autotext entry for the address
of
each company, then run the following macro on exit from the drop down, it
will insert the autotext corresponding to the company selected into the
formfield Text1:

' 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
"blue dog" blue wrote in message
...
I'm using Word 2002. I want to have a drop down box in my form, but I
want
the items you can choose from to be 2 or 3 lines. For example, I'd
like
to
enter a business name & address for 3 businesses, and have them be in
the
drop down box, but when selected, show up as a regular 3-line address.






Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
double window envelope tpdebronsky Page Layout 5 May 18th 23 08:51 PM
Multi Marking Shenan Stanley New Users 9 June 26th 05 05:26 PM
Line break in drop down field Ray_Johnson Microsoft Word Help 1 May 8th 05 07:51 PM
how do I delete the mail merge items in the tools drop down in Wo. mhorton Tables 1 April 12th 05 06:02 PM
Vertical line--leaving line and losing the box Chad Harris New Users 1 February 1st 05 04:50 AM


All times are GMT +1. The time now is 08:48 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"