Microsoft updates AppleScript dictionary for Outlook 2011 SP1

Yesterday, Microsoft released the Microsoft Office 2011 for Mac SP1 (14.1.0) Update. Outlook garnered a fair number of bug fixes and new features, some of which had been missing since Entourage. Under the hood it received a healthy dose of new commands, classes and properties in its AppleScript dictionary as well.

Compared to Excel, PowerPoint and Word, the amount of additional AppleScript support added with the 14.1.0 update is more than ten-fold their combined total, much of which had been long-standing requests from the scripting community. Scripters can view these new properties using the AppleScript Editor application found in /Applications/Utilities, selecting File –> Open Dictionary… and choosing Microsoft Outlook.app from the list.

Outlook Suite

The overall Outlook Suite added more than 50 new properties to the dictionary to control the preferences set under Outlook menu –> Preferences… A few examples:

  • General
    group similar folders — sets Outlook to use unified folders for Inbox, Sent Items, etc.
    hide on my computer folders — sets Outlook to show or not show folders “On My Computer”

  • Notifications & Sounds
    display alerts — sets whether or not Outlook will display a desktop alert when new mail arrives
    bounce dock icon — sets whether or not the Outlook icon will bounce in the dock when new mail arrives
    play sound on new message — sets whether or not Outlook will play a sound when new mail arrives

  • Categories
    categorize message from contacts — sets Outlook to apply categories based on the categories of the sender’s contact
    show new categories in navigation pane — sets Outlook to show new categories in the navigation pane while viewing the Calendar and Contacts

  • Reading
    mark item as read — sets when Outlook should mark items as read
    expand single conversation — sets Outlook to show an entire conversation when a message is selected

  • Composing
    use default account for replies and forwards — sets Outlook to use a specific account when replying or forwarding messages
    include myself as
    — sets Outlook to Cc or Bcc the sender

A new contacts panel class enables interaction with the Contacts Search window and includes properties such as:

  • search string — text to search
  • search typename search or all fields
  • current source — directory source

Outlook includes access to its new most recently used (MRU) list for meeting rooms:

  • meeting room mru — the locations property lists recently used locations

One of the most requested features was the ability to control imports into Outlook. That’s now possible for a variety of import options:

  • import olm — import an Outlook archive file
  • import pst — import an Outlook personal folders file (from Outlook for Windows)
  • import rge — import an Entourage archive file
  • import identity — import from a 2004, 2008 or EWS identity folder

Account Suite

New Exchange commands enable the scripter to retrieve information he otherwise wouldn’t be able to access including an autodiscover results class that can return these properties and more:

  • primary smtp address — Exchange account’s primary SMTP address
  • server — Exchange account’s server address
  • ldap server — Exchange account’s LDAP server address
  • oab manifest url — Address to retrieve the Offline Address Book (OAB)

The gal download directory property will allow the scripter to specify a directory for OAB download, which is something that cannot be done via Outlook’s GUI interface. A rooms property will allow the scripter to specify a directory for an account’s meeting room index.

Outlook’s dictionary also includes delegated account and other users folder account classes for dealing with Exchange delegates and shared folders.

A new autodiscover command will return results from an Exchange autodiscover query when executed with at least an email address and user name.

Mail Suite

Outlook’s mail features are improved with the following properties:

  • unread count — retrieve the unread count for a folder
  • plain text content — retrieve the body of a mail message without HTML tags

It also has a new command to import eml files into specific mail folders.

Contact Suite

Scripts can now retrieve notes in contacts as plain text content and convert information from contacts to vcard data format to be used externally. Additionally, scripts can now import vcf files into specific address books.

Calendar Suite

Similar to contacts, scripts can now retrieve event information as plain text content without HTML tags and convert calendar information to icalendar data format for external use. Scripts can also import ics files.

Task and Note Suites

Tasks and Notes are now accessible as plain text content or icalendar data.

Signature Suite

The Signature Suite is brand new in Outlook 14.1.0! Scripts can now manipulate signature data using these properties:

  • name — name of the signature
  • content — HTML content of the signature
  • plain text content — content of the signature as plain text
  • include in random — whether or not the signature is included in the random list

Nothing in the Signature Suite, however, enables a signature to be assigned to an account or to insert an image.

Rules (including the Mailing List Manager and Junk E-mail Protection) and autocorrect features are still not scriptable. Also, Visual Basic scripting is not included in Outlook nor is any sort of plug-in architecture, which Outlook for Windows has. This makes cross-platform scripting solutions impossible to implement for the time being.

Share this:
  • Twitter
  • Facebook
  • del.icio.us
  • Digg
  • StumbleUpon
  • Google Bookmarks
  • PDF
  • Print

6 comments to Microsoft updates AppleScript dictionary for Outlook 2011 SP1

  • Vincent

    Hi, Applescript is much appreciated.

    BUT i serioulsy a microsft office 6 applescript feature : beaing able to run VBA code via applescript (without any vba macro created first)

    before I was able to write

    do script ” some vba code ” & anASvaraible & ” some other vba code”

    and then the office suit version 6 would run the VBA ccode as if I create d a macro and then ran it. Today, we can’t only run macro already attached to the dcument. So not usefull for new documents, plus it’s much less flexible as you have to write a macro first and variable passing from AS seems not to be doable or extremly difficult.

    please please make that feature back

    • Our site is neither Microsoft-owned nor operated. You’ll need to use the Send Feedback tool under the Help menu in any Office application to let Microsoft know you want this feature back.

      FYI, however, neither Entourage nor Outlook has ever had VBA support. Excel, PowerPoint and Word in Office 2004 and earlier did.

  • Todd Ness

    Any clues on how to set the OAB if auto detect is turned off in the environment?

  • it is a shame that “rules and autocorrect features are still not scriptable”, I have been running win/office for nearly 2 decades now. I just moved from Win XP / Office 2010 to Apple OSX / Office 2011 and it feels like I just stepped back in time to the 1990s. So many of the advancements and improvements in Office that are available for Win users are just not there.

    Its unfortunate that I have to not only move away from Windows but also Office, perhaps MS does not realise the double-whammy effect it is creating with its inferior Office for Mac products

  • Allan Marcus

    How do you use the new autodiscover command? Can you give an example?

    Thanks.