Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming VBA / August 2007

Tip: Looking for answers? Try searching our database.

How to open and extract the content in attachment?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Raju A - 28 Aug 2007 08:36 GMT
Hi,

Is it possible to open and extract the content in attachment and save it to
MS Access.

Regards
Raju A
Ken Slovak - [MVP - Outlook] - 28 Aug 2007 14:24 GMT
Sure, save the attachment to the file system and load it into Access.

If you don't want to do that you'd have to either be running Outlook 2007 or
a call a lower level API than the Outlook object model to get at the
PR_ATTACH_DATA_BIN property (0x37010102), which is a PT_BINARY property.
You'd also need to access other properties of that item in the Attachments
table for attachment name and so on.

If you try to use the OOM from Outlook 2007 with the PropertyAccessor object
to retrieve PR_ATTACH_DATA_BIN it must be under about 4KB or you'll get a
MAPI_E_NOT_ENOUGH_MEMORY error, since PropertyAccessor doesn't fall back to
an IStream to read properties larger than it can handle with a direct MAPI
call.

Signature

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

> Hi,
>
[quoted text clipped - 4 lines]
> Regards
> Raju A
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.