Outlook 365 Mac, ‘nuking’ messages no longer working with AppleScript

Joined
Feb 13, 2021
Messages
4
Reaction score
0
In outlook 2011 I had an apple script, that would nuke messages, means permanently delete them from any folder in outlook.

I also had a keyboard shortcut assigned to it and so it made dumping spam and other uninteresting stuff really easy without putting them first in the trash and next remove them from the trash.

The script no longer works in 365 (mac version), so I am looking for a new solution. Does anybody have one?

FYI here is the script I have:

AppleScript:
tell application "Microsoft Outlook"
         set theMsgs to the current messages -- selected messages
         try
                  repeat with theMsg in theMsgs
                           permanently delete theMsg
                  end repeat
         on error errMsg number errNum
                  set theSubject to subject of theMsg
                  set theFolder to name of «class stor» of theMsg
                  beep
                  display dialog errMsg & return & return & errNum & return & return & "(Erroring on message: " & theSubject & " in " & theFolder & ")" with icon 2
         end try
end tell
 

Cory Cooper

Moderator
Joined
May 19, 2004
Messages
11,105
Reaction score
497
Hello and welcome.

I have very little experience with Automator/AppleScript. There are a few members here that may be able to help, or you could try the folks over at MacScripter.

Sounds like Microsoft may have made an underlying change in Outlook 365.

C
 
Joined
Nov 14, 2012
Messages
2,241
Reaction score
100
Hi,

Just wondering if Office 365 actually supports Apple script now, as Office 2011did.:(
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top