Saving attachments

Add-in Express™ Support Service
That's what is more important than anything else

Saving attachments
 
Rup Go




Posts: 64
Joined: 2007-03-01
hi,

im trying to save 1 of the mail attachments in a mailObject

Outlook.MailItem mailObject = null;
Outlook.Inspector inspector = OutlookApp.ActiveInspector();
object item = inspector.CurrentItem;
mailObject = item as Outlook.MailItem;

mailObject.Attachments.Count.ToString(); // i got 2 w/c is right

now the problem here is if i tried to access

mailObject.Attachments[0].FileName it gave me an array out of bounds exception.

y so? since the count retrieved was 2 so there should be an index 0 and 1 right?

thanks in advance
Posted 10 Apr, 2007 01:18:00 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Rup.

No, the indexes should be 1, 2 and so on.


P.S. Note that we take up your forum requests in the order we receive them. Besides, it may take us some time to investigate your issue. Please be sure we will let you know as soon as the best possible solution is found
Posted 10 Apr, 2007 09:35:02 Top