get attachment file data

S

sd

hello
I'm using VSTO SE Outlook add in for Outlook 2007 using vb.net.I need
to get attachment details -
MIME content type,content subtype & the file data itself. I used
redemption to get content type,subtype using field value &H370E001E of
safemailItem attachment.But was not able to get attachment file data.
Is there any way to get attachment file data without saving the file &
then getting its data?

thanks
 
K

Ken Slovak - [MVP - Outlook]

The actual binary data for the attachment is stored in PR_ATTACH_DATA_BIN.
That property is a PT_BINARY.

However, that may be encoded in some way so the usual method is to save out
the attachment to the file system and work with it from there.
 
S

sd

Thanks Ken!
I've still one problem -I was able to get content type & subtype for
existing mail attachment.But Is there any way to find out the content
type & subtype of outgoing mail attachment.I need to retrive this
info. from outgoing mail & send it.
thanks again for reply
 
K

Ken Slovak - [MVP - Outlook]

Sure. Just trap the item.Send() event and in that event handler first save
the item being sent, then access its Attachments collection and proceed the
same way.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top