Eugene Starostin

Complete review – Advanced Outlook Regions, part 3

My previous post, which focused on Outlook Explorer and Inspector regions, ended with the promise that there would be no pictures in the upcoming post, instead it would touch on rather unobvious, rarely used, but highly interesting stuff. Well, the first thing that I’d like to start with is cached instancing.

Cached instancing

Oh yes, there turned out to be room for the word that has a smell of something lower-level than forms embedded into Outlook. I am speaking about the Cached property of the Outlook Forms Manager component and about creating instances of your forms.

This property and its “mechanics” are described best on the Cached Outlook forms page. I’ll just point out that setting OneInstanceForAllFolders considerably speeds up the work of the add-in and Outlook itself. So, it would be unwise to shrug off this fact.

Outlook events exposed by the Add-in Express Outlook Forms Manager

Besides a number of Outlook events that are quite frequently used in add-in development, e.g. SelectionChange, FolderSwitch and NewInspector, the Add-in Express Outlook Forms Manager component (which is the heart of the Advanced Outlook Regions) exposes several other events inaccessible through the Outlook object model. Here they are:

  • NavigationPaneHide, NavigatioPaneShow, NavigationPaneMinimize – these names speak for themselves, don’t they?
  • TodoBarHide, TodoBarShow, TodoBarMinimize – names of these events are rather expressive as well.
  • ReadingPaneHide, ReadingPaneShow, ReadingPaneMove – hide and show events are easy-to-understand, as to the Move event, I will note that it fires when the Outlook Reading Pane is moved from the bottom to the right and vice versa.

Inspector mode – read and compose

In addition to the earlier existing methods of binding Outlook regions to context (see Context is a brilliant in Advanced Outlook Form and View Regions, part 1), version 2009 allows showing regions separately for read or compose inspector mode. For instance, you can show your regions only when the end-user is editing an e-mail message or reading a received meeting request. However, you should clearly understand which of Outlook items can be opened in this or that mode, and how a given mode is determined. I tried to put all information together in a table, and here’s what I have come up with:

Item Type Item.MessageClass Ribbon How read / compose mode is determined
Appointment IPM.Appointment.* OutlookAppointment Appointments are always opened in compose mode
Contact IPM.Contact.* OutlookContact Contacts are always opened in compose mode
Journal Journal IPM.Activity.* OutlookJournal Journal items are always opened in compose mode
Mail IPM.Note.* OutlookMailRead
Read mode if Item.Sent = True
Compose mode if Item.Sent = False
Meeting IPM.Schedule.Meeting.* OutlookMeetingRequestRead
Read mode if Item.Sent = True
Compose mode if Item.Sent = False
Post IPM.Post.* OutlookPostRead
Compose mode if Item.Saved = False or Item.Size = 0, else Read mode
For Outlook 2007:
Compose mode if WordEditor.ProtectionType = wdNoProtection, else Read mode
Task IPM.Task.* OutlookTask Tasks are always opened in compose mode

You may also be interested in:

One Comment

Post a comment

Have any questions? Ask us right now!