Search code examples
applescriptoutlook-2011

Using replay to all with Applescript and Outlook 2011


Right now I have a simple little AppleScript that will take the currently selected message and open a reply to window for the message.

I'm doing this to eliminate the default signature from the reply. For some reason Outlook 2011 does not have an option to exclude the signature on replies but using this script keeps the signature off.

Here's my script:

tell application "Microsoft Outlook"
    set replyMessage to selection
    set replyMessageSubj to subject of replyMessage
    reply to replyMessage
end tell

tell application "Finder" to activate (every window whose name is "Re: " & replyMessageSubj)

That opens the replay window and activates it for me. Works well but I'd like to have it reply all, not just reply.

The dictionary for Outlook 2011 says:

reply to v : Create a reply message.
reply to message : The message to reply to.
[opening window boolean] : Should the reply message be opened in a window? Default is to show the window.
[reply to all boolean] : Whether to reply to all recipients of the message. Default it to reply to the sender only.
→ message : The reply message.

I'm a bit of an AppleScript novice and can't find a good example... How do I get this to reply all?


Solution

  • Try:

    tell application "Microsoft Outlook"
        set replyMessage to selection
        set replyMessageSubj to subject of replyMessage
        reply to replyMessage with opening window and reply to all
    end tell