Group:  Microsoft Outlook ยป microsoft.public.outlook.program_addins
Thread: get attachment file data

Geek News

get attachment file data
sd <dshubhangi[ at ]gmail.com> 11/20/2008 2:02:53 PM
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
Re: get attachment file data
"Ken Slovak - [MVP - Outlook]" <kenslovak[ at ]mvps.org> 11/20/2008 2:39:39 PM
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.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"sd" <dshubhangi[ at ]gmail.com> wrote in message
news:77856b13-12ab-4c13-bbb7-fe85277b5753[ at ]40g2000prx.googlegroups.com...
[Quoted Text]
> 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

Re: get attachment file data
sd <dshubhangi[ at ]gmail.com> 11/21/2008 2:46:47 PM
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
Re: get attachment file data
"Ken Slovak - [MVP - Outlook]" <kenslovak[ at ]mvps.org> 11/21/2008 4:18:51 PM
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.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"sd" <dshubhangi[ at ]gmail.com> wrote in message
news:7892b2c7-ea21-469d-8c4a-fde075fdf938[ at ]r36g2000prf.googlegroups.com...
[Quoted Text]
> 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

Re: get attachment file data
sd <dshubhangi[ at ]gmail.com> 11/25/2008 12:57:01 PM
Thanks Ken

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net