Office 2010 for Developers: Outlook 2010 MAPI reference and a hint for the PowerPoint Developer

At the recent SharePoint conference, one of the things I was asked most frequently was whether or not we were going to "do anything" about the Outlook MAPI API. Fair enough. As we do at trade shows, we say "let me check and I'll report back to you on that." Today I am happy to report back on that. MSDN has posted the Outlook 2010 MAPI Reference for your browsing. Many of you may recall the recent announcement about the availability of the PST format documentation as well. Between the two, Outlook developers certainly have a lot more to take advantage of. Excellent progress for this release.

Excerpted from the Outlook 2010 MAPI Reference for your pleasure:

What's New in This Edition
This documentation is preliminary and is subject to change.
The Microsoft Outlook 2010 MAPI Reference has been updated to include documentation for various new features. Documentation for deprecated features has been removed.

New Content
Content has been added for the following features:

  • Support for 64-bit Microsoft Outlook—Reference topics for applicable API elements have been updated to correspond to new header files that support 64-bit Outlook. These header files are now available as a download at Outlook 2010: MAPI Header Files. A new code sample is provided in How to: Check the Version of Outlook to show how to check whether the installed version of Outlook is 64-bit Microsoft Outlook 2010. If your existing 32-bit MAPI application is going to be running on a 64-bit operating system with 64-bit Outlook installed, you will need to rebuild your 32-bit application as a 64-bit application. For more information about MAPI support for 64-bit Outlook, see Building MAPI Applications on 32-Bit and 64-Bit Platforms.

  • Fast shutdown support for MAPI clients—MAPI clients can now initiate a quick shutdown and have the MAPI subsystem notify loaded providers to minimize data loss from the fast shutdown. Additional interfaces have been added for the client and provider to support fast shutdown. For more information about fast shutdown, see Client Shutdown in MAPI.

  • Stream structure for field definitions for an Outlook item—Documentation for a binary stream for the PidLidPropertyDefinitionStream property has been added. This property specifies definitions of all custom fields and data-binding settings for built-in fields of an Outlook item.

  • More properties—Documentation for an additional 38 tagged properties and named properties has been added to this release.

  • Option of linking explicitly to MAPI functions—MAPI developers can now choose to explicitly link to the MAPI stub of the default MAPI client (for example, Msmapi32.dll of Outlook) without going through the MAPI library and the Windows MAPI stub. For more information about explicit linking as compared with implicit linking, see How to: Link to MAPI Functions.

 

Shortcuts for PowerPoint Developers
I've been digging into PowerPoint 2010 development extensively over the past week or so. I've learned a lot I had not worked with it in any meaningful way until a few weeks ago, and I thought I'd share a little beyond what I offered in VBA last week. First, a very useful piece of machinery for PowerPoint coding. This is a loop (written in VB) to iterate through all shapes on the slide currently in view. Once you get this down, the code to perform manipulations on those shapes and slide properties isn't too difficult (provided you can successfully navigate the OM).

https://blogs.technet.com/photos/gray_knowlton/images/3293460/original.aspx
(get the code)

As an example of this in use, here is a procedure to remove all underlines from the type used in the current slide.

https://blogs.technet.com/photos/gray_knowlton/images/3293462/original.aspx
(get the code)

Here's a way to identify the theme font and apply that font to shapes on the currently displayed slide. This is written in VB using VS2010 Beta 2 and Office 2010. This code sits under a button on a custom Ribbon tab. Theme fonts (both Major and Minor) have three variants: Latin, Complex script and East Asian, and each can be separately identified and modified given the appropriate changes to the code below. The biggest hurdle to identifying that font through the PPT OM is the ability to select (in most cases) the name of the Latin font. There isn't a lot of documentation for doing this, so I thought I'd share a little learning. As with all things, there are probably ways to do it better, but this works, so here it is.

https://blogs.technet.com/photos/gray_knowlton/images/3293463/original.aspx
(get the code)

 

PowerPoint Theme Builder
Also worth your time if you're doing a lot of work in PowerPoint is the Theme Builder. This handy tool will get you pretty far in developing or customizing theme files for PowerPoint. Theme builder works with PowerPoint 2007 today.

https://blogs.technet.com/photos/gray_knowlton/images/3293464/original.aspx

sample.txt