Attachment Size

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I'm currently developing a COM Add-in for Outlook using .NET Framework which takes different actions based on the size of an attachment in a MailItem object
The size of the attachments are potentially quite large so I would really like to avoid saving the file locally to know the file size

exampl

using Outlook = Microsoft.Office.Interop.Outlook
/*...*

private Outlook.MailItem _item

/*...*
foreach(Attachment attachment in this._item.Attachments)

// how do I get the size here without saving the file locally


/*...*

Regard
Eilef Helle
Mamut AS
 
I don't think you can do it without using Extended MAPI, where you can get
the attachment table and get the PR_ATTACH_SIZE property (0x0E200003), which
has the size for each attachment.




Eilef said:
Hi,

I'm currently developing a COM Add-in for Outlook using .NET Framework
which takes different actions based on the size of an attachment in a
MailItem object.
The size of the attachments are potentially quite large so I would really
like to avoid saving the file locally to know the file size.
 
Back
Top