Recursively process message attachments



I would like to write some VBA code to process mail messages with attachments
so that I can save the attachment in the file system.

So far, I have been able to do this, so long as the mail message only has a
file as an attachment (text, xls, doc, etc.).

I run into difficulties when I receive messages which contain other mail
messages as attachments, and the attached mail message itself has a file

It seemed reasonable that I could write a subroutine that could be called
recursively to process a message's attachment(s), but that does not seem to
be possible.

Does anyone know how to process a mail item with an attached mail item that
has a file (text, doc, xls, etc.) attached to it?

Ken Slovak - [MVP - Outlook]

It has to be saved to the file system as a MSG file, then opened using
Application.CreateItemFromTemplate(). Then you can process that attachment.

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