Olm Mapi Note Bug

Hello,
I set the back color or MapiNote message items somehow, no problem with items extracted from Ost/Pst but Msg items saved from Olm; seems MAPIFollowUpOptions.Categories or MapiNote.Color is not set correctly for Olm extracted Msg items, for example, MapiNote.Color is always Blue, these can be extracted and saved to the Msg at save time easily, actually, reading those from xml based Olm is much easier than complex Pst,Ost.

Can please share a code sample and OLM source file?

1 Like

Sorry seems a recent update broke my code, can you kindly check? For MapiNote items I set custom CssStyles and then insert the color based on the MapiNote.Color, however, does not always work anymore:
MhtProblem.zip (3.8 MB)

Also, when saving as Mht using Aspose Email, the results will be shown differently in Chrome/Edge vs IE11, mostly about headers section, this does not happen when saving as Mht using Aspose Words. Can you please check this is the output?
snapshot.png (65.8 KB)

No update broke your code. It’s your code that’s the problem.
You are trying to replace the color in the style MyMapiMessage.BodyHtml.Replace before you set the style itself ASPSaveSetMHT.CssStyles = ASPSaveSetMHT.CssStyles.Insert

1 Like

Hello,
Thanks for the tip, I shortened the code and missed some parts, anyway, let me ask something, using MapiMessage and also MailMessage, is there an easy/safe method to set the back color of the message? Specially for MapiMessage Msg without destroying its original body structures (ie if Rtf)

You can omit MyMapiMessage.BodyHtml.Replace at all, and set ASPSaveSetMHT.CssStyles = ASPSaveSetMHT.CssStyles.Insert with the required background color directly.