Solved

Macro for adding emails to a folder

Posted on 2010-11-29
1
194 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

MS Outlook is a world-class email client application that is mainly used for e-communication globally.  In this article, we will discuss the basic idea about MS Outlook, its advanced features, and types of MS Outlook File formats.
How to resolve IMCEAEX NDRs in Exchange or Exchange Online related to invalid X500 addresses.
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…
Many of my clients call in with monstrous Gmail overloading issues with Outlook. A quick tip is to turn off the All Mail and Important folders from synching. Here is a quick video I made to show you how to turn off these and other folders in Gmail s…

732 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