Connecting Tech Pros Worldwide Help | Site Map

modifying MeetingItem attachments in an Outlook Add-in

Newbie
 
Join Date: Dec 2008
Posts: 1
#1: Dec 24 '08
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
Stang02GT's Avatar
Moderator
 
Join Date: Jun 2007
Location: USA
Posts: 1,152
#2: Dec 24 '08

re: modifying MeetingItem attachments in an Outlook Add-in


Moved to the Misc Forum.
Reply