Auto-Hide Content (Filling out forms)

M

mzapalova

I am creating a form in Microsoft word, which contains a drop down about
mid-way through the sheet. There are 4 selections, and each selection
requires different information to be shown/hidden below.

For example, If I chose "breakfast" in the drop down, i want "eggs",
"bacon", "ham", "other" to show up. If I were to choose "lunch", i want
"turkey", "chips", etc.

Assuming that I have all of my various options written out, how do I
create a "hide content" formula upon the selection of a certain drop
down?
 
D

Doug Robbins - Word MVP

Create an autotext entry for the menu for each meal and then use for
following code in a macro that you run on exit from the formfield:

' Macro created 15-11-97 by Doug Robbins to populate a text formfield with
the autotext entry
' corresponding to the item selected in a dropdown formfield
'
Dim myDrop as DropDown
Set myDrop = ActiveDocument.FormFields("Meals").DropDown
Meal = myDrop.ListEntries(myDrop.Value).Name
Menu = ActiveDocument.AttachedTemplate.AutoTextEntries(Meal).Value
ActiveDocument.FormFields("Menu").Result = Menu

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