?
Solved

Outlook 2010 Macro Coding

Posted on 2014-04-03
3
Medium Priority
?
297 Views
Last Modified: 2014-04-04
I need code that, if I activate the macro while I have an email selected, the macro will forward the email to me and will delay delivery of the email until tomorrow at 2:00pm.

Any help is appreciated. Thank you.
0
Comment
Question by:carlosab
[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
  • 2
3 Comments
 
LVL 76

Accepted Solution

by:
David Lee earned 2000 total points
ID: 39977739
Hi, carlosab.

This will do what you described.  It will forward all of the messages you have selected to yourself with delivery set to 2:00pm on the following day.

Sub DelayedForward()
    Dim olkMsg As Outlook.MailItem, olkFwd As Outlook.MailItem
    For Each olkMsg In Application.ActiveExplorer.Selection
        Set olkFwd = olkMsg.Forward
        With olkFwd
            .Recipients.Add Session.CurrentUser.Address
            .Recipients.ResolveAll
            .DeferredDeliveryTime = DateAdd("d", 1, Date) & " 2:00 pm"
            .Send
        End With
    Next
    Set olkMsg = Nothing
    Set olkFwd = Nothing
End Sub

Open in new window

0
 

Author Closing Comment

by:carlosab
ID: 39977811
Perfect. Thanks.
0
 
LVL 76

Expert Comment

by:David Lee
ID: 39977851
You're welcome!
0

Featured Post

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

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

Earlier today, Google rolled out a new feature, Google Buzz; and the aptly named tool, is already creating quite a stir on the World Wide Web.  According to his post on the Gmail blog, (http://gmailblog.blogspot.com/) Edward Ho, tech lead for Google…
Zimbra is famous for its platform independency, ability to manage multiple user accounts, easy assimilation with 3rd party applications, social network certification etc. Here, we discuss about how users can move multiple Zimbra user accounts to Exc…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
In this Experts Exchange video Micro Tutorial, I'm going to show how small business owners who use Google Apps can save money by setting up what is called a catch-all email address in their Gmail accounts. By using the catch-all feature, small busin…
Suggested Courses

765 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