MAPI = Messaging Application Programming Interface, the
heart of Microsoft's messaging programs. Extended MAPI serves three
programming interface used to write components that
connect to different mail servers, provide access to
custom address books and provide rich storage facilities -- in other
words, the components that you can add through see on the Tools
| Services dialog in Outlook.
You can use MAPI to develop
new types of custom forms, not based on the built-in Outlook forms.
You can create addins for Outlook, Exchange and Windows
Messaging that extend the functionality of those clients.
This is an advanced environment, mainly for C++ and Delphi developers.
Outlook COM add-in developers have painfully learned with the
release of Office 2002 Service Pack 2, which blocks the HTMLBody
property, Extended MAPI offers no direct way of extracting the HTML
content from all messages. As developer Michael Schacter explains
HTML messages in personal folders in Outlook
2000/IMO and in Outlook 2003 have an Extended
MAPI property known as PR_BODY_HTML (0x1013001E)
or PR_HTML (0x10130102). One is of type
PT_STRING8 and the other is PT_BINARY; otherwise
they return the same information: the native
In Outlook 2000/CW and in Outlook 2002, there
is no corresponding property stored in incoming
e-mails on personal folders. (It appears that
incoming messages on HTTP folders (like Hotmail)
and on IMAP folders, do store the PR_BODY_HTML
property.) Instead, the HTML is encapsulated in
RTF and stored as compressed RTF. A call to
MailItem.HTMLBody converts the RTF to HTML on
the fly. This is accomplished through
RTFHTML.DLL, the functions of which are--to my
There is a hack (in the best sense of
the term) for converting RTF to HTML. However,
it is not a very satisfying solution. In the
sample code, search for "In actual fact" to
see the beginning of the example.
SDK | What MAPI Can Do That Outlook Can't | Discussion | Samples
| Tools | Problems |