Onenote Highlight

I'm trying to create a macro to type a txt into my onenote program. I've gotten the ctrl-1 and ctrl-3 but I'm then trying to yellow highlight which is ctrl-shift-H then the text .. but all the macro does is put the txt with an H before it. So here is the macro. I need the ctrl-shift-h after the ctrl 3 but it doesnt work. Help appreciated.

Hey Albert,

You didn't upload the macro, so we can't see where it's failing.

Please see this if you haven't already.

How to Post Your Macro to the Forum

Okay – I fiddled with this critter a bit and got it working on my machine.

Give it a try and let me know if it works for you.


Download ⇢ Insert Highlighted Text into OneNote.kmmacros (6.9 KB)

Thank you.

  All i'm looking to do is when i press "a2n" that the following be typed in onenote:

  Ctr-1 Ctrl 3 [AL TO JENNIFER] Assigned %ICUDateTime%MM/dd/yyyy @ hh:mm% -

I can get all the above done except have the AL TO JENNIFER highlighted in yellow.

Hey Albert,

I thought I demonstrated how to do that...

What are you using Ctrl-1 and Ctrl-3 for? They're meaningless in my stock OneNote installation.

In any case – here's a macro that doesn't include your control-key-presses but does the rest.

Strong Hint – Don't use Type a Keystroke actions when it's possible to use a Select or Show a Menu Item action instead. The latter is safer and more robust for a number of reasons.


Download ⇢ Insert Highlighted Text into OneNote -- Typed-Trigger.kmmacros (7.4 KB)