Send a OneNote Page as Email

So – trying to setup a KM macro to do the following:

  1. While in a Microsoft OneNote notebook page, I can click file>share>send page as email

  2. A new window opens and I just need to get to the To: field of an outlook email page but:
    a. Tabbing doesn’t work
    b. The only way I can see is to move mouse to select the newly opened Outlook window and then move mouse to the To: line and type in enough of address for Outlook to recognize (but of course the window doesn't necessarily appear in the same place every time).
    c. Then I have to hit the Send button.

Am I missing something or have I used KM as best as I can for this? I've got my macro to work as far as the email page.

Btw I typically use 2 monitors and the email window could show up on either screen in any position. Moving the mouse to it is the problem. I just want to be able hit the trigger, and have the macro bring up the email window, fill in the TO address and send it.

Thanks for any help!

It'll help if you post your macro, and let us know what version of macOS and Outlook you are using. Because when I click File->Share->Send page as email in OneNote, the new Outlook mail message comes to the front with the insertion point in the "To" field, ready to go.

Thanks for your reply.

Macro is quite simple;

Running Ventura 13.0, Outlook for Mac 16.72.2 (New Outlook), OneNote for Mac 16.72 and KM 10.2.

When I run macro or do the File>Share>Send Page as Email, my cursor is positioned in first line of body of email and I can only use mouse or trackpad to get to the To: field.

Have you tried Tab?

Yes I have thanks. Nothing happens. Seems only way to get to To field is to click it with mouse or trackpad

Just a thought, since cursor is always in the same position in the window (but window could be anywhere) is there a way to reposition mouse relative to cursor position and then click?

Works fine with the same except for Legacy Outlook -- one of the (many) reasons I've stuck with the "old" version.

I think the easiest way will be to tab to the "To" field. The standard "I want to tab out of a text field that takes tabs" method is ⌃⌥⇥, but that will take you the toolbar so work backwards with ⇧⌃⌥⇥ to get from the email body to the last header item then ⇧⇥ to the "To" field.

This works for me -- you may have to change the number of repeats to suit your setup:

Email OneNote Note.kmmacros (3.9 KB)


Those key sequences don't work on my system for some reason...

The cursor doesn't move at all.

Do they work if you do them by hand, with the insertion point in an Outlook field? What about in other apps?

Nope. Basically once File>Share>Send as email happens, Outlook opens a compose window with the cursor at the beginning of the message text. No keyboard shortcuts seem to work that move the cursor to the To: field. I can only get there by trackpad or mouse. None of the modified tab or arrow keys do anything.

I tried setting Spark as my default email reader but OneNote just opens Outlook.

I've got no experience with mouse or window control, but reckon that might be the only way to go. Or just be happy I can hotkey to the email compose page.

Then "New" Outlook is even worse than I'd realised... Is it only broken when going the OneNote Share route, or do you have similar keyboard control issues when making a new outgoing mail in Outlook itself?

That's more a troubleshooting thing. For now, the easiest workround would be image detection and "Click at..." with an appropriate offset. I'd use the majority of the header titles for the image, to try and reduce false positives -- for me, on old Outlook, that would be


...and the action is:


You'll probably have to precede that with a "Pause" action to allow time for window creation, and if you're like me and often have multiple outgoing emails on the screen then change "all screens" to "front window".

Actually on retesting, starting a new email, opens a compose wndow with cursor in To: field, and I can tab to Subject and Content areas. So that part works at least.