Dropdown list in Toolbar associated to a macro in MS Word
Dropdown list in Toolbar associated to a macro in MS Word
(OP)
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
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





RE: Dropdown list in Toolbar associated to a macro in MS Word
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: www.essexsteam.co.uk
RE: Dropdown list in Toolbar associated to a macro in MS Word
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
RE: Dropdown list in Toolbar associated to a macro in MS Word
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.
RE: Dropdown list in Toolbar associated to a macro in MS Word
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.