#1
|
|||
|
|||
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? |
#2
|
||||
|
||||
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 |
#3
|
|||
|
|||
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! |
#4
|
||||
|
||||
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 |
#5
|
|||
|
|||
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. |
#6
|
||||
|
||||
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 |
#7
|
|||
|
|||
Got it - just do a screenshot of the highlight button (in each of the different colors) and use that! Thanks you!!!
|
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 |
custom toolbar with buttons to open new docs based on templates | Brandi | Mail Merge | 18 | 06-15-2010 02:10 PM |