How to create a button in Outlook Mac 2011 programmatically?

1.4k Views Asked by At

I want to create a button to list all the alternative Email accounts in Outlook Mac 2011. I know that we can't use plug-ins in Mac Outlook and also certain limited functionality can be done using AppleScript. Can anyone please guide me on how to add a button in Mac Outlook by any means?

1

There are 1 best solutions below

0
On

I don't know if you can add a button or not, but you could write an AppleScript and have it available from the Script menu.

  1. Open the AppleScript Editor app.
  2. Choose "Preferences..." from the menu
  3. Click on the icon called "General".
  4. Check the checkbox called "Show script menu in menu bar".
  5. Now, you should see a script menu in the upper, right-hand part of your menu bar.
  6. Develop a script such as the following for testing:

    set thisAccount to choose from list {"Account 1", "Account 2", "Account 3"}
    
    if thisAccount is equal to false then return
    
    display dialog "The account chosen was: " & thisAccount
    
  7. Save this script in the folder: ~/Library/Scripts

  8. Depending upon your version of OS X, the folder ~/Library may be hidden. If so, you can use a command such as the following, from Terminal, to change the folder so that it is not hidden:

    chflags nohidden ~/Library/
    
  9. Save the script in the following folder: ~/Library/Scripts, It will be available from the scripts menu.

Choosing a script from the script menu

This is a start. What's left to do is to get the list of actual email accounts from Outlook and of course, once the email account is chosen, do what you need to do with it.