Outlook has no idea that you added something using another API, CDO 1.21 in
this case. Just use the Outlook object model to add the attachment, Outlook
will show that automatically.
You're already using the object model to handle the Inspector.Activate()
event, why drop into CDO? Especially since CDO is security restricted and
may not even be installed.
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm
"Ashish" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> In outlook addin when i open a mail ActiveInspector_Activate event is
> called. Here i add an attachment to this mail using MAPI. To add
> attachment using MAPI
> MapiSession->logon()
> MapiMessage = MapiSession->GetMessage(entryid)
> count = MapiMessage ->Attachment->Count
> MapiMessage ->Attachment->Add(path)
> MapiMessage ->Update();
>
> count = MapiMessage ->Attachment->Count, new count returns one extra
> value. it means attachment is added to mail but not display in mail. What
> should i do to display attachment in open mail.
>