Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Dropdown list in Toolbar associated to a macro in MS Word

Status
Not open for further replies.

alphabravotango

Chemical
Dec 19, 2004
2
Hi there,
I need to create a Word template with a dropdonw list of about 10 phrases, in a customized toolbar. The idea is that when I choose a phrase from the list, it is automaticaly inserted into the word document. How can I do this?
How can I associate the customized toolbar, the dropdown list and its contents with the macro code?

(Note: this is similar to the Word function "Auto text". But I would like to use customized text, not the text that already comes with Word)

Thanks a lot.
Alphabravotango
 
Replies continue below

Recommended for you

I would just use the AutoCorrect feature with your shortcut in the Replace box and the full phrase in the With box.

As an example go to Tools|Autocorrect Options|Autocorrect tab. In the Replace box type 'VBA' (without the quotes). In the With Box type 'Microsoft VBA - Visual Basic for Applications Forum' (without the quotes). Click OK and return to the document. type in vba and when you hit space bar that will change to Microsoft VBA - Visual Basic for Applications Forum

Good Luck
johnwm
________________________________________________________
To get the best from these forums read faq731-376 before posting

UK steam enthusiasts:
 
Thank you very much John, your tip is a very good one. However, I think it does not apply in my case, because I have so many phrases (at least 10 are related with ordinal figures, but there are more), so it is very difficult to remember all the combinations.
I was thinkin of a Visual Basic for Applications solution.
Once again, thank you for sharing the tip. It is very good and for sure I will use it in other context.
Regards,
Alphabravotango
 
You can define your own AutoText entries:
go to Insert/AutoText/AutoText...
Then type your autotext entry, and press the Add button.

Cheers,
Joerd

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.
 
The best bet would be to create a macro with a dropdown list suiting your needs and attaching it to a macro button on the toolbar.

I don't know how to create a custom pull down menu on a toolbar but I can tell you how to put a macro button on a toolbar.

Right click on any toolbar and click on customize. Click on the "Commands" tab and then scroll the left window to "Macros".

When you click on "Macros" in the left window, the right window will show all available macros. Your macro must be written before it will show up in this screen.

Click on your maco in the right window then drag it to any toolbar and drop it where you like.

When you click on the custom button while writing any document it will start the required macro which you can put your dropdown menu in.

This customized button will only appear on your copy of Microsoft Word but it can be installed on other computers as required by repeating these steps.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor