A
adobrzanski
I'm developing Outlook 2003 addin in c#.
I need to add/replace rtf body of a MailItem that is just being read
(mail_read event is triggered for that MailItem). I'm able to
successfully add/replace the RTF content (using PR_RTF_COMPRESSED and
WrapCompressedRTFStream passing MAPIOBJECT to small C++ code). I know
that I should dereference completely this item for the changes to take
place (for outlook to display added rtf). But can I do that on
mail_read event? Or is it too late?
Now I do dereference MailItem on read_event. But RTF is not being
displayed.
If I cancel mail_open event just after mail_read and cancel it
(Inspector is not displayed) and User openes this MailItem again, it
gives correct RTF body (just as I want it).
But I need to do this runtime. Canceling mail_open and then again
finding MailItem by EntryID and doing MailItem.Display() doesn't show
correct RTF body.
Any Ideas?
Thanks in advance
Alek
I need to add/replace rtf body of a MailItem that is just being read
(mail_read event is triggered for that MailItem). I'm able to
successfully add/replace the RTF content (using PR_RTF_COMPRESSED and
WrapCompressedRTFStream passing MAPIOBJECT to small C++ code). I know
that I should dereference completely this item for the changes to take
place (for outlook to display added rtf). But can I do that on
mail_read event? Or is it too late?
Now I do dereference MailItem on read_event. But RTF is not being
displayed.
If I cancel mail_open event just after mail_read and cancel it
(Inspector is not displayed) and User openes this MailItem again, it
gives correct RTF body (just as I want it).
But I need to do this runtime. Canceling mail_open and then again
finding MailItem by EntryID and doing MailItem.Display() doesn't show
correct RTF body.
Any Ideas?
Thanks in advance
Alek