Reply
 
Thread Tools Display Modes
  #1   Report Post  
orjanmen orjanmen is offline
Junior Member
 
Posts: 0
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Stefan Blom[_3_] Stefan Blom[_3_] is offline
external usenet poster
 
Posts: 6,897
Default 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   Report Post  
orjanmen orjanmen is offline
Junior Member
 
Posts: 0
Default

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   Report Post  
Posted to microsoft.public.word.docmanagement
Stefan Blom[_3_] Stefan Blom[_3_] is offline
external usenet poster
 
Posts: 6,897
Default 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   Report Post  
Martin@DocProd Martin@DocProd is offline
Junior Member
 
Location: Wellington, New Zealand
Posts: 3
Default

Quote:
Originally Posted by orjanmen View Post
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?
Hi
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   Report Post  
Martin@DocProd Martin@DocProd is offline
Junior Member
 
Location: Wellington, New Zealand
Posts: 3
Default

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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Macros on shortcut bar Ken Knight Microsoft Word Help 1 January 3rd 10 06:45 PM
How do I see a list of my macros with their shortcut keystrokes? Mark77 Microsoft Word Help 1 June 20th 09 05:42 PM
How do I print multiple shortcut documents from Explorer? Dannyw Microsoft Word Help 0 July 11th 08 03:44 AM
Determining Shortcut Keys For Macros MatthewTap Microsoft Word Help 2 January 18th 06 08:05 PM
shortcut keys to macros in the dropdown menu bhuvana Microsoft Word Help 1 June 1st 05 02:45 PM


All times are GMT +1. The time now is 04:12 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"