Recursively process message attachments

  • Thread starter Thread starter SlQ
  • Start date Start date
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
CWM330 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
H Outlook 2016 Custom made "Message" column Outlook VBA and Custom Forms 7
Terry Sullivan Unwanted Duplicate E-Mails -- One with My Message and the Other Blank Using Outlook 0
M Outlook 365 adding standard message in body of template email Outlook VBA and Custom Forms 3
E "The operation cannot be performed because the message has been changed" Using Outlook 3
G Reply a selected message and remove blank space before signature Outlook 365 version 2406 64BIT Outlook VBA and Custom Forms 2
G Reply a selected message and remove blank space before signature Outlook 365 version 2406 64BIT Outlook VBA and Custom Forms 0
D Outlook 365 Outlook Message "Cannot be sent because the message has changed" Using Outlook 0
B Please remind me how I added this message button Outlook VBA and Custom Forms 0
E PgUp and PgDn don't work for displayed message content (but do for web pages) Using Outlook 4
M A plug in (or method) to keep email message formatting after it expires Using Outlook 1
Rob Can't save MailItem because the message changed in .pst file Outlook VBA and Custom Forms 0
M Search message, then (1) Jump to folder & (2) Select message that you searched for Outlook VBA and Custom Forms 6
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

Similar threads

Back
Top