Save outlook attachments via VBA

Plugging Away 1 Reputation point
2024-06-04T01:03:44.9833333+00:00

I found this beautiful code on your site: https://learn.microsoft.com/en-us/office/vba/api/outlook.attachment.saveasfile

But it only saves the first attachment. How can I have it loop through and save all the attachments in case there is more than one attachment?

Outlook
Outlook
A family of Microsoft email and calendar products.
3,215 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,641 questions
0 comments No comments
{count} votes