Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-14-2020, 05:59 PM
nhcowboy1 nhcowboy1 is offline How to add multiple different color highlight buttons to toolbar Mac OS X How to add multiple different color highlight buttons to toolbar Office 2004 for Mac
Novice
How to add multiple different color highlight buttons to toolbar
 
Join Date: Mar 2018
Posts: 8
nhcowboy1 is on a distinguished road
Default How to add multiple different color highlight buttons to toolbar

I edit text for a living, and rely on highlighting to help me identify certain kinds of text. Different colors for different types of text.

I'm working in MS Word for Mac 2011 - which gives me one highlight button in my editing toolbar. In order to change the color, I have to go to the button and reset it. I can add additional buttons, but they all automatically reset themselves to whatever color I used most recently.




What I need are multiple highlight buttons - each preset (and locked) to a different color, so I can easily click on blue, green, yellow, or whatever, as I need them.


Can anyone tell me how to do that?
Reply With Quote
  #2  
Old 10-14-2020, 07:26 PM
Guessed's Avatar
Guessed Guessed is offline How to add multiple different color highlight buttons to toolbar Windows 10 How to add multiple different color highlight buttons to toolbar Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,932
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

You would need macros to do this via buttons since they aren't built-in. You can do a series of macros to toggle the colours. There is a finite number of highlight colours but if you know the available constant names for the colours then you just build another macro for each one.
Code:
Sub HL1()
  SetHiLite wdYellow
End Sub

Sub HL2()
  SetHiLite wdBrightGreen
End Sub

Function SetHiLite(iCol As Long)
  If Selection.Range.HighlightColorIndex = iCol Then
    Selection.Range.HighlightColorIndex = wdNoHighlight
  Else
    Selection.Range.HighlightColorIndex = iCol
  End If
End Function
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #3  
Old 10-16-2020, 03:39 PM
nhcowboy1 nhcowboy1 is offline How to add multiple different color highlight buttons to toolbar Mac OS X How to add multiple different color highlight buttons to toolbar Office 2011 for Mac
Novice
How to add multiple different color highlight buttons to toolbar
 
Join Date: Mar 2018
Posts: 8
nhcowboy1 is on a distinguished road
Default

Andrew - Thank you for your prompt reply, but I still have some questions . . .

First, I don't understand the longer macro - the one that begins with "function".
Second, how do I find out the names of the different colors?
And, finally, how do I create buttons in the different colors - one for each highlight color?

Thank you!
Reply With Quote
  #4  
Old 10-16-2020, 05:16 PM
Guessed's Avatar
Guessed Guessed is offline How to add multiple different color highlight buttons to toolbar Windows 10 How to add multiple different color highlight buttons to toolbar Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,932
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

The Function is where the work is done but it has to be summoned by the Subs which pass in the particular colour that you want. You can make as many copies of the subs that you want colours for.

There is a finite number of highlight colours available and so the list of available constants is quite small. The easiest way to work out the special word for a colour is to start a macro recording and apply that highlight colour to some text and then look at what was recorded.

I don't use a Mac and don't know the process to add buttons to the ribbon while you are using Mac Office 2011. I notice you have updated your Office version since your first post - perhaps you can do a google search to find out how to put buttons on your ribbon or QAT (if it exists on Macs) to run a macro.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #5  
Old 10-16-2020, 05:27 PM
nhcowboy1 nhcowboy1 is offline How to add multiple different color highlight buttons to toolbar Mac OS X How to add multiple different color highlight buttons to toolbar Office 2011 for Mac
Novice
How to add multiple different color highlight buttons to toolbar
 
Join Date: Mar 2018
Posts: 8
nhcowboy1 is on a distinguished road
Default

No, didn't update my computer since my last post - just my profile!

So, I don't completely understand about the macro you wrote . . . do I just redo the entire thing for each different color?

And, as for the buttons . . . there's a finite set of icons available to attach to a macro, but it also allows me to paste an image. I just don't know how to copy the highlight icon (in each of the different colors) in order to add it to the macro.
Reply With Quote
  #6  
Old 10-16-2020, 06:04 PM
Guessed's Avatar
Guessed Guessed is offline How to add multiple different color highlight buttons to toolbar Windows 10 How to add multiple different color highlight buttons to toolbar Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,932
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

If you want 5 buttons, you will need 5 different Subs where the only thing that changes is the name of the Sub and the colour setting. You make one Sub per button.

Do you have an image editor on your Mac? If you take a screen capture while displaying the available highlight colours, you can then select the region of each of the coloured boxes and copy each as a separate image and paste those into the button image which aligns with the Sub your button runs.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #7  
Old 10-16-2020, 08:03 PM
nhcowboy1 nhcowboy1 is offline How to add multiple different color highlight buttons to toolbar Mac OS X How to add multiple different color highlight buttons to toolbar Office 2011 for Mac
Novice
How to add multiple different color highlight buttons to toolbar
 
Join Date: Mar 2018
Posts: 8
nhcowboy1 is on a distinguished road
Default

Got it - just do a screenshot of the highlight button (in each of the different colors) and use that! Thanks you!!!
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to create a "Font color" button and a "Highlight text" button in the Quick Launch toolbar ? gloub Word 12 02-19-2019 03:19 PM
Can I edit macro buttons on the quick access toolbar in excel? appo Excel Programming 2 11-13-2018 10:30 AM
Is it possible to use two of the same toolbar buttons in Word 2007? WaltR Word 3 08-04-2012 03:30 PM
Need to put two highlight buttons on toolbar in different colors davidmrt Word 6 12-11-2011 05:54 AM
How to add multiple different color highlight buttons to toolbar custom toolbar with buttons to open new docs based on templates Brandi Mail Merge 18 06-15-2010 02:10 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:05 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