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?

Microsoft 365 and Office | Development | Other
Outlook | Windows | Classic Outlook for Windows | For business
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.