Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #16  
Old 04-21-2017, 09:06 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. I am not using the Customise the ribbon dialog. The only reason was to get the name of the Style Manager which turned out to be a macro, not a command.

I have two issues:

First is how to call the routine btnNewStyleSets_Click from the xml ribbon file so the style dialog will display

Second is do I need to add the
Sub btnNewStyleSets_Click(control As IRibbonControl)
to the template vba, and what code do I put in that routine.



I have read the QAT information links but I am still missing something. Please bear with me as a week ago I didn't even know there was xml behind the ribbon.
Reply With Quote
  #17  
Old 04-22-2017, 09:19 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,138
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

What problem are you having?

Is your button showing up in the Ribbon? Ribbon button or QAT icon? It makes a difference.

Do you click on your button and nothing happens?
Reply With Quote
  #18  
Old 04-22-2017, 04:41 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

The button appears in the ribbon. Not using the QAT. This is the xml I am using.
<button id="Btn99" label="Style Menu" onAction="btnNewStyleSets_Click"/>
When I click the button, nothing happens. What I don't understand is what the btnNewStyleSets_Click routine is. Is it some hidden built in procedure within Word, or do I have to write something in my VBA to display the dialog?

I use VBA a lot in Access and understand if it was in Access, I would just create a button click procedure. Not sure if I have to create the procedure in Word, or if it is some embedded procedure.
Reply With Quote
  #19  
Old 04-23-2017, 06:31 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,138
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

It looks like btnNewStyleSets_Click is built into the Styles Pane. It is not a macro that is accessible by name. It is a part of the Style Pane and if a macro, is the equivalent of a private macro.

So, what you want is a button that displays the Manage Styles dialog?

Last edited by Charles Kenyon; 04-23-2017 at 05:21 PM.
Reply With Quote
  #20  
Old 04-23-2017, 04:18 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

That sounds right. Any suggestion as to how to do this?
Reply With Quote
  #21  
Old 04-23-2017, 05:25 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,138
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

Recommendation, for now, insert the command as a QAT button saved in your template. Perhaps later you will be able to do a Ribbon modification. Right now, I do not know how.
Reply With Quote
  #22  
Old 04-23-2017, 05:50 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,138
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

The following command in a group will give you the button.
<button idMso="StylesManageStyles" visible="true" size="large"/>
Reply With Quote
  #23  
Old 04-23-2017, 10:04 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

Think I am there now. Did a lot of research based on what you taught me and now use the following in the procedure.

Application.Dialogs(wdDialogStyleManagement).Displ ay

The style dialog I was using I suspect was from an addin called FSPro. It is a variation on the standard Word one above. The one above does all the same things, but not in such a visually appealing format. That had me confused for a long time.

Anyway, the journey taught me a lot about ribbons so thank you for that. Hopefully my new ribbon will do all I want.
Reply With Quote
  #24  
Old 04-24-2017, 04:55 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,138
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

What I gave you was the XML to add a large button to the ribbon. That button would essentially launch the Style Management dialog, giving the same result as the code you found. The difference is that it uses the standard button from Word to do it. (I suspect that you already know this. I am commenting primarily to help someone who stumbles across this thread later.)

I gather that FSPro had its own dialog box (userform).
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 04:09 AM.


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