Something similar to VLOOKUP in Word?

N

Nan

Is there a way to create a lookup table, or something that works like a
lookup table in Word 2003 SP2? What I'm trying to accomplish is, when a user
chooses a vendor name from an AutoTextList field, I'd like the vendor number
to automatically populate another field.
 
D

Doug Robbins - Word MVP

' 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(Company).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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top