Apple script from Outlook 2011 no longer working in Outlook 365

I have the following Apple script that used to work in Outlook 2011 but does not work any longer in Outlook 365.

Any ideas as to what could be wrong?

Thanks.

on run {input, parameters}
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
return input
end run