Okay, I’ve downloaded the app, but cannot access its settings without subscribing too O365. I can however see the AppleScript dictionary. All of the elements seem to be supported, so I would suggest using Script Debugger to see if you can get any insight into what is failing when it is run.
In having a look around, I noted this query on the Microsoft community forums, and what I guess is the follow-up on Microsoft’s GitHub Support community. My experience of dealing with Microsoft in the past is that the often treat bugs and issues poorly. I’ve been asked to suggest bug fixes as enhancement suggestions on public forums in the past! But if you haven’t got anything back from there, there’s a reasonable chance it may not be positive news any way. Microsoft support are good at pointing you to KBA, but are not going to help you outside of that - as you can probably tell from “AppleScript” for their own app not even being classed as in scope.
If you can’t get a lead on the issue with Script Debugger, don’t have Keyboard Maestro (or equivalent), and don’t have the same confirmation disable option available as in Windows, then I think you’ll be stuck for a reliable option. Which of course could reasonably lead to what I would term an unreliable option.
For me an unreliable option (so please do not take this as a recommendation) would be to create an AppleScript that sends
Shift+Delete to Outlook, pauses for say 1 second, and then sends
return. That should, I think (again I can’t test this), then trigger the default button on that dialog you posted the image of; which should confirm the deletion. Relying on a pause rather than checking if the dialog has appeared is where the unreliability comes charging in. The longer the delay, the more reliable it should be. But there’s always a chance your Mac will suddenly slow down, and the longer the delay the less efficient it is as you want it to be as faster than pressing enter yourself for that confirmation. but saying that, the enter and delete keys are next to one another on my keyboard, so the actuation of that sequence manually would be minimal. Probably half a second or less once it’s in my muscle memory.