IConverterSession, changed in 2010?

R

Robert Simpson

I am calling MAPIToMimeStm() on an IConverterSession to save an MSG file as
EML. With Office 2007 installed, the resulting EML file is correct and is
written out as multipart/alternative, with plain text and html body sections.

Once I Installed Office 2010 and ran the same code, I no longer get the same
result. My EML file is now text/plain, and I only get the plaintext version
of the email.

Help!

I can provide a sample MSG on request. For simplicity, I used MFCMAPI and
did Session->"Convert MSG to EML", used the default options, and got exactly
the same results.

I used Office 2010 x86 edition on a Win7 x64 machine, and MFCMAPI 6.0.0.1017
to run the test.
 
R

Robert Simpson

So here's what I've learned. The PR_RTF_COMPRESSED stream contains the html
of the e-mail. However, the PR_HTML_BODY property is missing. If I query
that property even though it's missing, it'll still return the HTML to me.
If I take the resulting HTML and write it back to PR_HTML_BODY and then save
it as EML, it writes the EML properly.
 
R

Robert Simpson

Minor scratch. MFCMAPI reported MAPI_E_NOTFOUND when it showed
PR_HTML/PR_HTML_BODY, but when I double-clicked to edit the property, it
showed me the HTML. If I made a change to it and closed the dialog, then
saved the EML, it worked properly in Office 2010.

In my own code however, I had to get the html from PR_RTF_COMPRESSED, and
write it back into PR_HTML_BODY to save the EML properly.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top