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?
 
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
CWM550 This rule has a condition that the server cannot process? Using Outlook 1
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
M Search message, then (1) Jump to folder & (2) Select message that you searched for Outlook VBA and Custom Forms 2
Kika Melo How to mark as Junk any message not from Contacts (in Outlook.com) Using Outlook 3
G Outlook 365 My iCloud Outlook doesn’t work after reinstalling Microsoft365 on Windows 10 PC – now I get error message on contacts and calendar Using Outlook 1
G Get current open draft message body from VBA Outlook VBA and Custom Forms 1
E Outlook 365 Save Selected Email Message as .msg File - oMail.Delete not working when SEARCH Outlook VBA and Custom Forms 0
HarvMan Outlook 365 - Rule to Move an Incoming Message to Another Folder Using Outlook 4
F Outlook 2019 Forwarding Message and Keeping Unread Status Outlook VBA and Custom Forms 0
E Save Selected Email Message as .msg File - digitally sign email doesn't works Outlook VBA and Custom Forms 1
C Populate form data into message body Outlook VBA and Custom Forms 1
J Outlook 365 Add keywords from Listbox to the message body where cursor is placed Outlook VBA and Custom Forms 0
B How to create a button that sorts and selects the most recent message with ONE click Using Outlook 2
P "Item could not be moved" message occurs frequently for IMAP inbox, Office 365 Using Outlook 0
A rule name into message - how? Outlook VBA and Custom Forms 5
A Links in email getting error message about group policy Using Outlook 4
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 4
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 1
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

Similar threads

Back
Top