Using the same shortcut keys to highlight text in Mail, Excel and Word

One mundane issue that I deal with is often highlighting information in emails, spreadsheets, Word documents and file lists. I wanted to use the same key command for all those, but found that for each application, the method was different.

In Mail, I used the built-macro in KM - works great there, but changes formatting in Word, doesn't work in Excel (need the cell background formatted in Excel, not the text) and is not designed for changing the tag color in Pathfinder.

In Word, I needed Applescript rather than using the "Customize Keyboard" function in Word - I wanted to be able to highlight in yellow, green, blue, etc...and also to clear the highlighting with a key command too.

In Excel, I also needed a method to fill the cell background with different colors and clear them too. Took me a while to figure out how to do what is very simple once you figure it out.

And finally, I wanted to be able to set the label color of files while previewing them, so could sort them by label after making my selections.

For each of the above, I set up a folder in KM to only fire that macro when in the correct application, and be able to clear as well as highlight in a variety of colors.

2 Likes

Hey Jacques,

I usually build application-specific macros too, but don't forget there's a case construct and a front-application-token for when you prefer to have one global macro.

-Chris


Using a Case Construct.kmmacros (5.5 KB)

1 Like

Chris -

That’s cool…I did not know that functionality existed. More tools to use!
Thanks!
Jacques

Thanks for sharing these! I've been meaning to work out AppleScripts for similar formatting macros in Excel for some time, and your post both helped me figure out some of what I wanted to do and inspired me to finally take the time to set them up. In case they're of use to anyone else, I've taken the liberty of attaching the new additions to my Excel-only macro group below (my apologies for the long image; hopefully it displays properly):

Used gglick as an example and developed all of the above however a global KM for any applications or specific applications.

Not all is entirely working

  • ie. Wish i can get formatting in GMAIL for fonts/ colours
  • The exception catch-all does not work for all apps. A little annoying - not too sure how to fix.

Text Working With Macros.kmmacros (104.1 KB)