attachment access

D

Dan

Hi all,

I'm writing a plugin/add-in for MS outlook but am having trouble getting a
handle on attachments. The best I can find is an offset in the email
message that points to the start of the attachment. I'd really prefer to
have a pointer to a static object containing the attachment or even just a
path to the file but I can't get it anywhere.

Outlook keeps inserting the files into the email instead of links to it.

Anyone know how to get a decent pointer to attachments?
 
S

Sue Mosher [MVP]

To access the data in an attached file, you must first use the Attachment.SaveAsFile command to save the file to disk, then use application methods appropriate to the type of file to access its data.

--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
http://www.slipstick.com/books/jumpstart.htm
 
D

Dan

Damn!

I was hoping you weren't going to say that!

Problem is, i don't know whether they will be sending 50kb or 300mb... :/

I don't want them to wait for 5 minutes while it saves 300mb.. oh well

Thanks for all your help!

Dan.

To access the data in an attached file, you must first use the
Attachment.SaveAsFile command to save the file to disk, then use application
methods appropriate to the type of file to access its data.

--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
http://www.slipstick.com/books/jumpstart.htm
 

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