Solved

Outlook 2010 Macro Coding

Posted on 2014-04-03
3
292 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
  • 2
3 Comments
 
LVL 76

Accepted Solution

by:
David Lee earned 500 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

If you can connect to your internal network or can connect to your router but are not able to connect to the Internet follow these steps in order until the problem is resolved.   1. Right click on the network icon on the task bar and select "Troub…
Introduction Ever had certain email messages or responses that you find yourself using over and over again? Do you use Google's Gmail system? If so, then this article is here to help you save time by teaching you how to create email templates from …
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 …
A simple description of email encryption using a secure portal service. This is one of the choices offered by The Email Laundry for email encryption. The other choices are pdf encryption which creates an encrypted pdf of your email and any attachmen…

920 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

15 Experts available now in Live!

Get 1:1 Help Now