|
Hello,
I'm developing an Outlook Add-in and I'm trying to modify the attachments of an Outlook item before it's being sent. I'm able to successfully do it with a MailItem, but I wasn’t able to do it with a MeetingItem.
Consider the following simple examples:
/* removing the first attachment from MailItem - works just fine */
void OutlookApplication_ItemSend(object Item, ref bool Cancel)
{
Outlook.MailItem OutlookMailItem = Item as Outlook.MailItem;
OutlookMailItem.Attachments.Remove(1);
}
/* removing the first attachment from MeetingItem - doesn’t work, although the Count property of Attachments is decreased by 1, the attachment still stays on */
void OutlookApplication_ItemSend(object Item, ref bool Cancel)
{
Outlook.MeetingItem OutlookMeetingItem = Item as Outlook.MeetingItem;
OutlookMeetingItem.Attachments.Remove(1);
}
I'll appreciate any help with doing this.
Thanks,
George Sonq
|