word and excel

J

Joe

Is there an easy way to have a word file let the user select a field from an
excel file (like a drop down box) and then have other data related to that
field update in the word file? I assume I have to do this with a macro but
I thought it may be worth asking first.
 
D

Doug Robbins

The following doesn't deal with the Excel-Word part but may give you an idea

' Macro2 Macro

' 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