2
votes

I'm trying to create an applescript to use on outgoing email messages in Outlook 11 for Mac to dynamically set the email signature in the message based on who the sender address is. I have multiple accounts in Outlook, and would like to change the signature based on which one I'm using. Below is the code I've been trying, but have not had any success. Any advice?

tell application "Microsoft Outlook"
    if message sender contains {name:"emailaddress"} then
        set the message signature to signature {name:"signaturename"}
    else
        set the message signature to signature {name:"signaturename2"}
    end if
end tell
1

1 Answers

0
votes

If I understand your question, I think Outlook 2011 has this capability built in, without the need for any scripting.

  1. Click "Outlook", then "Preferences..." from the Outlook menu
  2. Click the "Signatures" icon
  3. Set up the signatures you need if you haven't already done so, and give them meaningful names
  4. Click the "Default Signatures..." button
  5. Associate the relevant signature to each account that you require

There seems to be a bit of a trick to using this. If you want the signature for account X to appear automatically in a new message, then you must first select a folder from account X before creating a new message. If you do that, then the message should include the correct signature that you have set up for that account.