Wednesday, January 20, 2010

“What's New for Developers in Outlook 2010”

MSDN - What's New for Developers in Outlook 2010

Summary: This article presents a top-level view of the enhancements and additions for developers in Microsoft Outlook 2010. It also examines, in depth, some of the new and enhanced objects in the Outlook object model, including their properties, methods, and events. For developers who are eager to learn the Outlook platform, this article provides sufficient detail to begin coding against Outlook 2010.

Randy Byrne, Microsoft Corporation

November 2009

Applies to: Microsoft Outlook 2010 Beta

Contents

Accessing Rich Text Formats (RTF)

Outlook supports access to rich formatting for the body of an item through the WordEditor property of the Inspector object. WordEditor represents the Word.Document object in the Microsoft Word object model. Inspector.WordEditor works well in cases where an Outlook item is displayed in an inspector. For cases where the inspector window is not displayed, Outlook 2010 introduces the RTFBody property on an item object such as MailItem, AppointmentItem, and so on. RTFBody is exposed on all item types except for NoteItem and JournalItem. RTFBody is a read/write property, and you can set or get a byte array that represents the RTF stream for the item. Depending on your development environment, you must convert the byte array returned by RTFBody to a string, modify the string that contains the RTF, if necessary, convert the string to a byte array, and then set the RTFBody to the modified byte array.

The following code example writes the RTF for the first item in the Selection object for the active explorer window to the Debug trace listeners window in Visual Studio. The code obtains the byte array from the mail object, and then uses System.Text.AsciiEncoding to convert the byte array to a string.

What's New for Developers in Outlook 2010 …”

There’s a good chance that Office/Outlook 2010 will be my next dev target platform at work, so I wanted to capture this for future reference and review. Initially the new RTFBody property stood out for me. At work that’s “officially a biggie.” :) Then there’s all the new conversation stuff. Not sure if that applies to work, but still I found it interesting…

(via Le Café Central de DeVa - Outlook Object Model enhancements & Changes for Outlook 2010)

No comments: