Solved

Macro for adding emails to a folder

Posted on 2010-11-29
1
190 Views
Last Modified: 2012-05-10
Hi all,

I print a lot of invoices etc that come into my inbox and I would like a macro that copies an email to a certain folder (either within Outlook or a folder on the C drive). I still want to keep the original email in the inbox and just create a copy of it in this directory.

Thanks guys,

Derek
0
Comment
Question by:TLN_CANADA
1 Comment
 
LVL 59

Accepted Solution

by:
Chris Bottomley earned 500 total points
ID: 34236853
How would it be called?  The basic mechanics of the save are:

Chris
Set my_obj = Application.ActiveInspector.CurrentItem
   If my_obj.Class = olMail Then
       If my_obj.BodyFormat = olFormatPlain Then
           my_obj.saveas pathandfilename & ".MSG", olmsg
       ElseIf my_obj.BodyFormat = olFormatRichText Then
           my_obj.saveas pathandfilename & ".RTF", olRTF
       ElseIf my_obj.BodyFormat = olFormatHTML Then
           my_obj.saveas pathandfilename & ".HTML", olHTML
       End If
   End If

Open in new window

0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Learn more about how the humble email signature can be used as more than just an electronic business card. When used correctly, a signature can easily be tailored for different purposes by different departments within an organization.
Are you unable to connect or configure Hotmail email account in Microsoft Outlook 2010, 2007? Or Outlook.com emails are not downloading to Outlook? Lets’ see the problem and resolve Outlook Connector error syncing folder hierarchy (0x8004102A).
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now