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 MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to insert drop-down box into Word doc 1

Status
Not open for further replies.
Mar 29, 2004
120
US
Hi,

I want to insert drop-down box into Word doc.
Do I have to have the values come from a different word/excel file? When I specify Insert->Object I don't see the oiption.


Thanks
 
Use the forms toolbar to insert a drop down box. Go to view, toolbars, form. With the cursor where you want the dropdown inserted click dropdown box on the toolbar. On the newly inserted dropdown box, right click and go to properties. You can then insert the items for the drop down box. Click O.K. In order to use the form you will need to protect the document. Go to tools, protect document. Set the protection to only allow filling in of forms. You will need to unprotect the document whenever you want to edit it.

Hope this is what you needed.
 
Alternatively, you can use ActiveX controls. To use ActiveX dropdowns (or combobox) select View > Toolbars > Control Toolbox.

For a bit of information on FormFields (the drop downs michbar suggested) see my FAQ on FormFields. There are a number of suggestions on how to use them there.

ActiveX controls have a lot more events than FormFields. Therefore there are a lot more things you can do with them. Their drawback is that to use use them you pretty much have to use code.

For example, FormField dropdowns can be populated (the items in the dropdown) directly in Word, as michbar mentioned. They can be populated by code as well. ActiveX have to be populated by code. Their advantage is that you can directly size them, move them, and interact with them.

Gerry
 
Gerry,

I initially looked at that, but was presssed for time, and didn't take time to find out how to populate the ActiveX drop-down by code. I tried:

Dim EntryCount As Single
Private Sub MyDropDown_Click()
EntryCount = EntryCount + 1
MyDropDown.AddItem (EntryCount & " Item1")
End Sub

but that didn't work.

In order to use FormFields I pretty much have to lock the project form, and then my hyperlinks don't work. I need to have hyperlinks to other files. Any suggestions?

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top