Processing Outlook Attachments in Excel

G

Guest

Hi,
All of the emails in one of my Outlook folders contain a single text file
attachment in a standard format. I need Excel to process the contents of the
attachments in this folder. I am envisaging copying each of the attachments
in turn into an Excel workbook where my macro would extract and store the
required contents.

I am very much a newbie but despite this, I have found and successfully
tested various code samples for the majority of my requirement e.g. opening
Outlook from an Excel macro, processing folders, reading folder items and
extracting Subject details.

However, I can find no samples which indicate whether it is possible to
access/process the contents of Text file attachments. I am looking for
a) Confirmation that this is possible
b) Sample code or pointers to existing articles detailing the solution.
In any replies, please bear in mind I am very much a newbie.

Regards
Richard Samuel
 
K

Ken Slovak - [MVP - Outlook]

You have to save the attached file to the file system in order to be able to
work with it. Once it's saved there you would work with it just as you'd
work with any other text file.

The following sample code takes attachments in all selected email items and
saves them to the file system. You can adapt that code to iterate the folder
contents and save out the attachments:
http://www.slovaktech.com/code_samples.htm#StripAttachments
 

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