Solved

Outlook 2010 Macro Coding

Posted on 2014-04-03
3
294 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Anti spam recomendations for Microsoft Office 365 6 25
Best way to unsubscribe to unwanted email 7 449
Ecryped with Zepto Ransomware 12 203
smtp c source code 7 85
Are you using email marketing software? If not, you're missing out on effortless marketing and the reaching of desired conversion rates through email marketing software.
The advancement in technology has been a great source of betterment and empowerment for the human race, Nevertheless, this is not to say that technology doesn’t have any problems. We are bombarded with constant distractions, whether as an overload o…
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…

840 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