Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Multiple macros on same shortcut
Hi.
Would like to change background color, and font color with a macro. But I want them all to be in a order on the same shortcut. For each time I press the shortcut, It will change the color. Is there a way to do that? Color combinations I want on "F9": | B:White F:Black | B: Black F:White | B:Black F:Yellow | I also got a problem when recording. I record changing the font color from white to red/yellow/blue/green etc. When I run the macro, it will change the color from white to black when. What is wrong? |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Multiple macros on same shortcut
Macro recording has limitations, as you have noticed. In this case, when the
macro has finished running, you get the last color that you selected during the recording. Since this forum doesn't get much attention anymore, you may want to post in the programming section of the Microsoft Community instead: http://answers.microsoft.com/en-us/o...sc&tab=Threads. -- Stefan Blom Microsoft Word MVP "orjanmen" wrote in message news Hi. Would like to change background color, and font color with a macro. But I want them all to be in a order on the same shortcut. For each time I press the shortcut, It will change the color. Is there a way to do that? Color combinations I want on "F9": | B:White F:Black | B: Black F:White | B:Black F:Yellow | I also got a problem when recording. I record changing the font color from white to red/yellow/blue/green etc. When I run the macro, it will change the color from white to black when. What is wrong? -- orjanmen |
#3
|
|||
|
|||
Thanks! I don't know why, but the macro only works if I manually set the backgrount color to yellow. If that don't work, I try to set it manually to black, then it works. If I do so, then it works great!
Thanks for the tip about the Microsoft forum. Now my next goal is to make the shortcuts work on another PC if I export the macro template. Seems the shortcuts get set locally, but would like to make them a part of the template, so users don't need to do anything other than open the template and press the shortcuts for the macros to work. |
#4
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Multiple macros on same shortcut
On 2014-06-27 11:10, orjanmen wrote:
Thanks! I don't know why, but the macro only works if I manually set the backgrount color to yellow. If that don't work, I try to set it manually to black, then it works. If I do so, then it works great! Thanks for the tip about the Microsoft forum. Now my next goal is to make the shortcuts work on another PC if I export the macro template. Seems the shortcuts get set locally, but would like to make them a part of the template, so users don't need to do anything other than open the template and press the shortcuts for the macros to work. If you share the macro by sending a whole template, already set up with code and shortcuts, all recipients have to do is put the template in their Startup folders. |
#5
|
|||
|
|||
Quote:
I use a similar process for annotating selected text with "[" and "]" characters and a highlight. In my example below, I call a routine to place the characters around the selection and then test the first character of the selection, and apply a different highlight colour. The effect if pressed the multiple times is to toggle the selection between the two colours. You may want to adapt this concept. Hope this helps. Martin. The link below has links to some useful Word Tools and how to make them available in a template so they can be used by every document you open without having to load them into each one individually. www.documentproductivity.blogspot.co.nz |
#6
|
|||
|
|||
Call wrkSelectToHighlightBoundaries
Select Case Selection.Characters.First.HighlightColorIndex Case wdYellow Call wrkHighlightSelection(wdBrightGreen) Case Else 'wdNoHighlight or wdBrightGreen Call wrkHighlightSelection(wdYellow) End Select |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macros on shortcut bar | Microsoft Word Help | |||
How do I see a list of my macros with their shortcut keystrokes? | Microsoft Word Help | |||
How do I print multiple shortcut documents from Explorer? | Microsoft Word Help | |||
Determining Shortcut Keys For Macros | Microsoft Word Help | |||
shortcut keys to macros in the dropdown menu | Microsoft Word Help |