Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-21-2017, 07:51 AM
Charles Kenyon Charles Kenyon is offline Modifying the Ribbon in Word 2016 Windows 10 Modifying the Ribbon in Word 2016 Office 2013
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,535
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Here is my "go-to" reference:
RibbonX: Customizing the Office Ribbon by Robert Martin, Ken Puls, and Teresa Hennig
Although written for Office 2007, it is still gold.

You need to name your macro as a ribbon control.
i.e. Sub btnNewStyleSets_Click(control As IRibbonControl)

Take a look at my Continuous Page Numbering Add-In which has a single button added to the header tab with an associated macro.
For a different example where none of the macros are triggered directly by Ribbon buttons but rather are triggered through QAT buttons, see Random Text Add-In.
Reply With Quote
  #2  
Old 04-21-2017, 04:55 PM
NevilleT NevilleT is offline Modifying the Ribbon in Word 2016 Windows 7 64bit Modifying the Ribbon in Word 2016 Office 2003
Novice
Modifying the Ribbon in Word 2016
 
Join Date: Mar 2015
Posts: 29
NevilleT is on a distinguished road
Default

Hi Charles. Thanks for responding. Not clear on the answer. Let me explain again.

I look at Style Manager by opening the customise ribbon and looking at all commands. I go down and hovering over the menu item, it tells me it is a macro.

At this point, I am not sure what I do with it. Since it tells me it is btnNewStyleSets_Click, do I have to add that as a sub to my VBA and write some code for it to open the Style Manager panel?

Apologies for asking such basic questions but I have spent a considerable time on Google without success. I did look at your example, but it seems to be a straight forward macro you wrote yourself, and I see how that works. I have a few VBA routines I have written on the toolbar, but cannot work out what I do with an inbuilt macro.

I think I have my head around commands, and running my own VBA routines, but not sure what to do with inbuilt Macros. Also thanks for the book reference.
Reply With Quote
  #3  
Old 04-21-2017, 06:43 PM
Charles Kenyon Charles Kenyon is offline Modifying the Ribbon in Word 2016 Windows 10 Modifying the Ribbon in Word 2016 Office 2013
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,535
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Quote:
Originally Posted by NevilleT View Post
Hi Charles. Thanks for responding. Not clear on the answer. Let me explain again.

I look at Style Manager by opening the customise ribbon and looking at all commands. I go down and hovering over the menu item, it tells me it is a macro.

At this point, I am not sure what I do with it. Since it tells me it is btnNewStyleSets_Click, do I have to add that as a sub to my VBA and write some code for it to open the Style Manager panel? ***
If you are talking Ribbon Customization, you do NOT want to be messing with the Customize the Ribbon dialog if you want custom images.
Modifying the Ribbon in Microsoft Word
Customize the Ribbon (It doesn't take rocket science)
Below is the dialog you do not want to be using...
00 deleteme 3.png

Working on the XML produced by that dialog is way more trouble than it is worth, if it can even be done.

If you are customizing the QAT, on the other hand, the Customize the QAT dialog may well be the place to start, even if you are going to be modifying the XML directly at a later time.
Below is the similar dialog for modifying the QAT:
00 deleteme 2.png

Modifying the QAT in Microsoft Word


This is a Word command, it is not a macro. You can't modify it, but you can call it.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Modifying the Ribbon in Word 2016 Visio 2016 diagrams embeded in word 2016 not drawing properly stubbo66 Visio 2 08-24-2016 05:58 PM
Modifying RTF File in MS Word 2007 Nickster Word VBA 2 12-02-2015 11:33 PM
Modifying the Ribbon in Word 2016 Modifying list styles in word dreamz Word 1 06-30-2014 12:03 PM
How to import the customized ribbon to Word without overwriting the existing Ribbon? SharonSh Word VBA 0 09-26-2013 11:47 PM
Modifying the Ribbon in Word 2016 Modifying an existing table in Word janewayb Word Tables 1 04-08-2013 06:17 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:46 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft