using macros in a word document

A

aegis

for both word 2003/2007, where should I like for instruction/tutorial/
reference in creating the following
in a word document: imagine two a field with
a combo box and the given options, then
for whatever item selected from the combo box,
a set of lines will be inserted in some designated
region on the same page.

I hope that was clear.
 
D

Doug Robbins - Word MVP

Here is a macro that replaces populates a TextInput FormField with the
autotext entry, the name of which is selected in a DropDown FormField

' 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
Company = ActiveDocument.FormFields("Dropdown1").Result
Address = ActiveDocument.AttachedTemplate.AutoTextEntries(Company).Value
ActiveDocument.FormFields("Text1").Result = Address

Can probably be shortened to:

With ActiveDocument
.Formfields("Text1").Result =
..AttachedTemplate.AutoTextEntries((.FormFields("DropDown1").Result).Value
End WIth
 

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