Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Drop Downs in Word 2003 sp2 2

Status
Not open for further replies.

mscallisto

Technical User
Jun 14, 2001
2,990
US
I'm having problems finding out how to create a DropDownListBox in MS Word 2003.

MS Word "Help" seems to suggest I need a "Form" or VBA to create a DDLB.

I've never created a word Form and "Help" seemed to give me the impression it's more work than I want to get involved with.

An example of what I want is:

Pick a color [ ]
Choose a day [ ]
etc.

Of course I need to manage the list box contents, and "Help" tells me that I can double click a DDLB to manage the contents.

Can someone tell me exactly what needs to be done to create and manage DDLB's and point me to the topic in MS Help where I should be looking?

thanks in advance
 
go to view -> toolbars -> forms

When this tool bar appears click on the icon you want to insert. Once on your screen usually in grey rightclick on the grey area and go to properties. Here you can add your list.

ck1999
 
There are two dropdown possibilities. They are very different.

1. Dropdowns from the Forms toolbar. These are formfields. The items listed are entered into them by right clicking the formfield, selecting Properties, and then adding the items from the dialog. You add them by entering the text of the item into the Dropdown item field, and clicking "Add".

And yes, if you double-click the dropdown formfield you get the same dialog.

"Of course I need to manage the list box contents, and "Help" tells me that I can double click a DDLB to manage the contents."

Did you try this? That is exactly what you do.

You use the Forms toolbar to put in the formfield. View > Toolbars > Forms.

2. Dropdowns from the Controls toolbar. These are ActiveX controls. The items listed must be populated by code - that is, a procedure (most commonly Document_Open as that will populate the items into the dropdown when the document is opened).

You use the Controls toolbar to put in ActiveX controls. View > Toolbars > Controls.

There are advantages and disadvantages to formfields vs. ActiveX controls.

It depends on your requirements.

ActiveX controls have events that can be very useful. However, they can also trigger security warnings. Why? Because they do, by their nature, execute code.

It depends on your requirements.

faq219-2884

Gerry
My paintings and sculpture
 
Ok Gerry thanks for getting me started.

I did the following:

View > toolbars > Forms

I typed "Pick a color " on the document then clicked on DropDownFormField and placed the DropDown Form field to the right of my field, good so far.

I doubleClicked the formField and added my items, Blue, Green and yellow, again good so far.

Now how do access the DropDown so I cak pick a color, it currently only shows the top entry?
e.g.
Pick a color [Blue]

The list box doesn't show the typical "down arrow" to click and make a choice.
 
You have to protect the document and click tools -> protect document. Click the option for forms or Filling in forms

ck1999
 
Thanks Guys, I'm a happy camper!

BTW DropDownListBoxes are much easier in excel !!

sam
 
Yes, and thanks again, I understand that now.

The MS Help is really quite good but one really has to learn how to "read" it.

The more time I spend in "help" the more I discover the logic (or structure) of why it's written the way it is, it's just not overly friendly in the beginning.
 
The more time I spend in "help" the more I discover the logic (or structure) of why it's written the way it is, it's just not overly friendly in the beginning."

It is certainly better than it used to be. No, it is not overly friendly in the beginning.

My chief complaint about Help is that while it has a lot of great useful examples, many examples use undeclared objects. If you do not know why, and what to do about it, you can pull your hair out in the beginning.

Example:

Set myRange = ActiveDocument.Range(Start:=0, _
End:=Selection.End)

For Each aWord In myRange.Words
If aWord.Text = "Franklin " Then aWord.Delete
Next aWord

Great, but neither myRange, nor aWord, is declared in the example. The Range object is fairly easy to figure out, but aWord? You can not declare it as a word object (Dim aWord As Word), as there is no such thing. It is in fact another Range object, but can not be declared as one. It must be declared as nothing (Dim aWord, defaulting to Variant), or as Object.

How is someone just starting to know that? Nor does Help state that MS Word VBA considers the period at the end of a sentence a "word", nor that the paragraph mark - after the period - is ALSO considered a "word".

Nevertheless, I for one would not have been able to move forward without Help...and Tek-Tips of course!

faq219-2884

Gerry
My paintings and sculpture
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top