PDA

View Full Version : How do I attach a ribbon button to a particular template in Word 2010?



HelenT
10-07-2015, 01:52 AM
Hello,

I'm quite new to VBA programming so there's alot I don't know so please bear with me if my questions seem banal!

I wish to assign a macro to a custom ribbon button on Word 2010 BUT ONLY FOR A PARTICULAR TEMPLATE FILE so that the button only appears when that template has been attached to the file I'm working on ...

There will be about 30 users using this over the network in my office, so the idea is that storing the button on the template file will allow the button to be portable to other users without me having to manually install it on each user's PC ...

Many thanks, Helen

gmaxey
10-07-2015, 03:30 AM
See: http://gregmaxey.mvps.org/word_tip_pages/customize_ribbon_main.html but if you are using Word 2010 or higher you can add button to the ribbon with the user interface with the option to be in all documents or only the specific document/template. The button icons are limited though.

HelenT
10-07-2015, 05:43 AM
Hi Greg,

I _am_ using 2010 but have been unable to add a button to the ribbon for a particular template, when I add the button it is always there irrespective of which document/template I have open. The only customisable thing that I have been able to store to a template is a keyboard shortcut to my macro ... this is not quite what I want :-(

How do I add a ribbon button to a particular template? I have been adding the button via: right click on ribbon ->Customize the ribbon. I cannot see any option here to save it to a particular template?

Thanks, Helen.

gmayor
10-07-2015, 06:59 AM
You cannot use the built-in editor to edit the ribbon of a particular template, only the QAT (Quick Access Toolbar). You need the Custom UI editor, which is described in Greg's web page http://gregmaxey.mvps.org/word_tip_pages/customize_ribbon_main.html

gmaxey
10-07-2015, 03:22 PM
Helen,

Yes, I stand corrected. I've never used the built-in UI to customize the ribbon itself. Graham is correct. Only the QAT works the way I suggested.

Thanks Graham.