Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #9  
Old 12-22-2019, 05:52 AM
Charles Kenyon Charles Kenyon is offline Creating buttons for individual paragraph styles on a ribbon tab - not using Quick Styles Windows 10 Creating buttons for individual paragraph styles on a ribbon tab - not using Quick Styles Office 2019
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,595
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

Ribbon modifications made through the Customize the Ribbon dialog in Word are not easily transferred from one computer to another and when you do, they overwrite any customizations to the Ribbon or QAT existing. They do not allow for small icons/buttons initially. I suspect that as enough get added to the ribbon some of them would shrink.

Here is an example where each icon is assigned to a macro inserting a style:

If this were done using XML coding instead, you could have small icons and would have a much larger choice of built-in icons including the numbers from 1-9.

QAT modifications, on the other hand, can be assigned to a custom template holding the macros without using XML coding. However, without that coding, every button will be a little ball. Modifying the Quick Access Toolbar (QAT) in Microsoft Word, Modify Quick Access Toolbar (QAT) Button Image or Text by Greg Maxey, MVP


Whatever method is used will be labor-intensive to create.


Here are macros for the styles that I just wrote. Again, each style would need to have a macro.


Code:
Sub StyleNormal()
        Selection.Style = ActiveDocument.Styles("Normal")
End Sub

Sub StyleBodyText()
        Selection.Style = ActiveDocument.Styles("Body Text")
End Sub



Sub StyleHeading1()
        Selection.Style = ActiveDocument.Styles("Heading 1")
End Sub
Sub StyleHeading2()
        Selection.Style = ActiveDocument.Styles("Heading 2")
End Sub
Sub StyleHeading3()
        Selection.Style = ActiveDocument.Styles("Heading 3")
End Sub
Sub StyleHeading4()
        Selection.Style = ActiveDocument.Styles("Heading 4")
End Sub
Sub StyleHeading5()
        Selection.Style = ActiveDocument.Styles("Heading 5")
End Sub
Sub StyleHeading6()
        Selection.Style = ActiveDocument.Styles("Heading 6")
End Sub
Sub StyleHeading7()
        Selection.Style = ActiveDocument.Styles("Heading 7")
End Sub
Sub StyleHeading8()
        Selection.Style = ActiveDocument.Styles("Heading 8")
End Sub
Sub StyleHeading9()
        Selection.Style = ActiveDocument.Styles("Heading 9")
End Sub
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Rearranging the styles in the ribbon? seanspotatobusiness Word 2 01-16-2017 12:33 PM
Styles in a Custom Ribbon inagalaxyfarfarawry Word 5 12-15-2015 11:18 AM
Creating buttons for individual paragraph styles on a ribbon tab - not using Quick Styles Restricting paragraph styles without restricting character styles Red Pill Word 5 05-25-2012 01:06 PM
Creating buttons for individual paragraph styles on a ribbon tab - not using Quick Styles Quick Styles Set saved but it doesnt appear at the styles list! Pedro77 Word 3 10-15-2011 05:17 AM
Cell Styles always expanded in ribbon gregglee Excel 2 12-29-2010 07:36 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:45 PM.


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