Recursively process message attachments

Status
Not open for further replies.
S

SlQ

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

attachments.

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?
 
K

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.

"JT" <JT> wrote in message

news:DDBEB32C-8A98-4004-AC70-26D15A1A7E1D@microsoft.com...
> 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
> attachments.

> 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?

>
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
A How to create fixed signatures for aliases that process through GMAIL? Outlook VBA and Custom Forms 0
C Synchronizing subscribed folders causes hanging during send/receive process Using Outlook 2
M Outlook macro to automate search and forward process Outlook VBA and Custom Forms 6
Diane Poremsky How to Process Mail After Business Hours Using Outlook 0
Diane Poremsky How to Always Process Mail After Business Hours Using Outlook 0
Diane Poremsky Project and Business Process Management Tools Using Outlook 0
T VBA to process each email Outlook VBA and Custom Forms 10
S Outlook VBA rule script to process both MailItem and MeetingItem Using Outlook 0
T Add-in problem: Process All Marked Header doesn't display email bodies Outlook VBA and Custom Forms 5
D Read/process in browser Outlook VBA and Custom Forms 5
J Toolbar button to process current mailitem Outlook VBA and Custom Forms 1
Q Sending a email using an account setup for the process sending the Outlook VBA and Custom Forms 8
F Outlook process left after closing BCM (Business Contact Manager) 3
U looking for feedback on installation process and on eMarking Assis Outlook VBA and Custom Forms 1
O How to find and replace a word in Outlook-Agenda-Subject and Message? Using Outlook 0
X Open Hyperlinks in an Outlook Email Message (Help with Diane's solution) Outlook VBA and Custom Forms 3
Commodore Unable to move message Using Outlook 3
Y Disable Microsoft Outlook Test Message Using Outlook 5
S Unable to change Message Class Outlook VBA and Custom Forms 0
S Changing Message Class Outlook VBA and Custom Forms 4
Cathy Rhone Mail merge error message Using Outlook 2
C Can't Locate an Unread Message in my Outlook view pane Using Outlook 0
G Send a greeting message to a contact on birthday Outlook VBA and Custom Forms 5
B Inconsistent handling of message read/unread status by Outlook Using Outlook 3
N Save Selected Email Message as .msg File Outlook VBA and Custom Forms 12
T Macro to move reply and original message to folder Outlook VBA and Custom Forms 6
O Outlook 2010 Add delete button to the side of the message list Using Outlook 1
Cathy Rhone The properties of the message have been changed Using Outlook 1
S Outlook 2016 A Shortcut to recall and delete and sent message. Using Outlook 1
T vba extract data from msg file as attachment file of mail message Outlook VBA and Custom Forms 1
S Unable to extract text from an Outlook email message Using Outlook 2
R Outlook 2016 Message-ID oddity/inconsistency? Using Outlook 7
J Implement Keywords based on body message Outlook VBA and Custom Forms 0
C must select message to trigger safe list Using Outlook 3
witzker HowTo Change message Class of contact form Outlook VBA and Custom Forms 0
D.Moore VB script to Digitaly Sign newly created outlook message Outlook VBA and Custom Forms 2
O VBA Outlook Message Attachment - Array Index Out of Bounds Outlook VBA and Custom Forms 0
W September 2020 - No Default Email Client message after Office Update Using Outlook 1
A Flag Message for Follow Up after sending Outlook VBA and Custom Forms 1
S Outlook (2016 32bit; Gmail IMAP) - Save sent message to Outllook Folder Outlook VBA and Custom Forms 0
C Why won't Title display in message list? Using Outlook 1
icacream content in this message could not be downloaded.... Using Outlook 2
J Outlook 2016 After a search in all mailboxes, where is each message that was found? Using Outlook 6
R Warn before sending message Outlook VBA and Custom Forms 4
T Column to display which email alias a message was sent to Outlook VBA and Custom Forms 6
V Change start time based on message duration Outlook VBA and Custom Forms 2
J Message search and edit, another way? Outlook VBA and Custom Forms 4
N VBA to delete duplicates by message-id on common pst for 2 or more emails Outlook VBA and Custom Forms 0
S Create A Search Folder That Looks For Message Class? Outlook VBA and Custom Forms 0
M VBA to auto forward message with new subject and body text Outlook VBA and Custom Forms 8

Similar threads

Top