'VBA Outlook - Get email addresses from attached .msg files
I would like to have some code that helps me to get the email address of the sender of an attached .msg file.
I have an email with around 10 emails attached. I need to copy the sender address from them into the clipboard or an excel sheet.
Solution 1:[1]
You would need to
- save the attachment as an
msgfile, - open it using
Namespace.OpenSharedItem - once you open it as
MailItem, you can read theMailItem.Senderproperties.
You can also use Redemption (I am its author) - it allows to directly open the message attachments as RDOMail objects using RDOAttachment.EmbeddedMsg.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
