Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Macro for adding emails to a folder

Posted on 2010-11-29
1
Medium Priority
?
198 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 2000 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

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

This article describes how to import an Outlook PST file to Office 365 using a third party product to avoid Microsoft's Azure command line tool, saving you time.
If you troubleshoot Outlook for clients, you may want to know a bit more about the OST file before doing your next job. IMAP can cause a lot of drama if removed in the accounts without backing up.
CodeTwo Sync for iCloud (http://www.codetwo.com/sync-for-icloud?sts=6554) automatically synchronizes your Outlook 2016, 2013, 2010 or 2007 folders with iCloud folders available via iCloud Control Panel. This lets you automatically sync them with…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

618 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