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.
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:
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
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
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
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 type — name 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
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.
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.
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.
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.
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.