Reputation: 8918
First off, I apologize for not having much to start with. I'm clueless when it comes to VB and Outlook. I have a pretty strong background in Java/Python, though, if that helps make explaining things easier.
Basically, I have emails autoforwarded from another outlook account via a "forward this email as an attachment" rule. I use the "as an attachment" part to keep the original "To" and "Cc" fields intact for reply-all situations.
What I would like to do is, when I receive this email with no body that has an attachment with the actual email I care about in it, move (copy) the attached email to my inbox and delete the original "container email."
I found a post about moving attachments to a folder, and the code makes sense, but I can't find anything about dealing with email folders.
Is there any way to do this with VB/Rules?
Upvotes: 0
Views: 195
Reputation: 53663
You will want to use the MailItem.Move method:
http://msdn.microsoft.com/en-us/library/office/ff860683(v=office.15).aspx
Of course, you will need to build in sufficient logic per your requirement:
What I would like to do is, when I receive this email with no body that has an attachment with the actual email I care about in it, move (copy) the attached email to my inbox and delete the original "container email."
Upvotes: 1