Moving marked messages in Outlook to a certain folder

What I want to achieve is

I’m in Outlook (usually my Inbox) - the currently selected message(s) should get moved into a certain folder. i.e. - and the message should go into the folder @NextWeek

My thoughts:

  • I could do this with KM and the image recognition capabilities, running through many menus, some typing and clicking to get this done. Don’t like it though.

  • It should be more reliably achievable via a JXA Script or AppleScript. I’d prefer JXA since I just can’t get my head around AppleScript (which I’ll use if there is no other way).

If any of you have a similar automation or JXA script that achieves some part of what I want to do, I would appreciate a share here.

I’ll certainly share my solution once I get it working.



I ended up solving this myself after all - essentially my solution ended up being:

  • A KM Macro, which defines the Folder to sort into as a variable and then executes the JXA Script.
  • A JXA (Javascript for Automation) Script that tells Outlook to move the selected messages to the defined folder.

I’ve published the Macro & the Script on Github - you can find it here if you need it:

Feedback & improvements would be highly appreciated.