Creating an Outlook Rule using Internet Header time

Not open for further replies.
Outlook version
Outlook 2010 64 bit
Email Account
Exchange Server
To keep this simple, I need to move some email when it arrives in the Outlook Inbox to another folder based upon time sent.

I am attempting to create an Outlook Rule using the Internet Header of email received. I want to move any email sent to a mailbox between certain hours to the Deleted Items folder.

As an example, part of an Internet Email Header is:

Server (TLS) id 15.0.888.9 via Mailbox Transport; Mon, 3 Mar 2014 19:33:28


I created and enabled a Rule as follows:

Apply this rule after the message arrives

with '12:' or '13:' or '14:' or '15:' or '16:' or '17:' or '18:' or '19:' in the message header

move it to the Deleted Items folder

In testing, an email was sent during the '19:' hour and received in Outlook. However the Rule didn't work. I tried the * wildcard, *'12'* etc., but that didn't work either.

I recognize I'm dealing with UTC time and have adjusted my Rule accordingly.

Any suggestions would be appreciated. Thanks.
It's too bad the rule that lets you check dates doesn't also support times. But, you can use a run a script rule. If it's a daily thing, you'd use Timevalue function to check the time.

Sub DeleteMail(Item As Outlook.MailItem) 
If TimeValue(Item.ReceivedTime) < TimeValue("4:59:00 AM") Or _
TimeValue(Item.ReceivedTime) > TimeValue("4:59:00 PM") Then
      Item.Move (Session.GetDefaultFolder(olFolderDeletedItems))
     End If
 Set Item = Nothing 
End Sub

ETA: if you aren't sure how to use it.
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
Liza Creating a rule in outlook to filter messages Using Outlook 0
A Creating an outlook rule to forward an email with a specific message Using Outlook 1
J Outlook creating unwanted rule on its own Using Outlook 1
D Outlook 2016 Creating an outlook Macro to select and approve Outlook VBA and Custom Forms 0
T Outlook creating unwanted tasks in Tasks and Todo from emails Using Outlook 1
M Creating an RSS Feed **FROM** Outlook 2013 Calendar. Using Outlook 5
R Would creating a new profile cause Outlook to download all the old mails from the server? Using Outlook 1
T Outlook creating a folder named: "Unwanted" Using Outlook 3
M Outlook 2007 Contacts Glitch: Creating a new email Using Outlook 1
D Creating an outlook session from Access vba but run silently. With A specific profile Outlook VBA and Custom Forms 1
M Creating Outlook Appointments from Excel Cells Outlook VBA and Custom Forms 1
N Creating or changing the main new mail message template in Outlook 2010 Using Outlook 2
Rupert Dragwater creating gmail account in Outlook 2013 Using Outlook 7
J Creating an "isolated" shared calendar in Outlook Outlook VBA and Custom Forms 1
Witzker Outlook bug when creating a user defined contact form? Using Outlook 1
Wotme Creating a Outlook task in Excel Using Outlook 7
G Questions on creating Outlook forms Using Outlook 0
K Outlook 2010 creating extremely large PST files for IMAP accounts Using Outlook 3
J Troubleshooting Creating New Outlook Account Using Outlook 1
P HTA creating Outlook MeetingItem - need formatted body text Using Outlook 4
A Creating a sign up form in Outlook 2010 Using Outlook 1
N Creating dynamic forms in outlook?? Using Outlook 2
F Creating Macro in Outlook 2003 Using Outlook 8
M Outlook 2010 and how to get attachments listed when creating a new email? Using Outlook 1
V Creating Distributions in Outlook Connector Using accounts in Outlook 1
S Outlook 2010 Ribbon - Creating Links To Websites or EXE Files Using Outlook 4
O Macro for creating hyperlinks in Outlook 2007 Using Outlook 3
J Creating Tasks in Outlook 2007 with VBA Outlook VBA and Custom Forms 1
U Creating or modifying Outlook .Nk2 file in C# Outlook VBA and Custom Forms 1
C Creating an Outlook Profile for RPC over HTTP client Outlook VBA and Custom Forms 1
I Creating an Outlook 2007 macro that attaches a signature to new me Outlook VBA and Custom Forms 1
J Creating form in Outlook 2007 Outlook VBA and Custom Forms 1
G Creating Macro to scrape emails from calendar invite body Outlook VBA and Custom Forms 6
S Custom Contact card - need help creating one Outlook VBA and Custom Forms 1
N Help creating a VBA macro with conditional formatting to change the font color of all external emails to red Outlook VBA and Custom Forms 5
G Event when creating task from mailitem Outlook VBA and Custom Forms 2
Fozzie Bear Outlook 2016 Creating a shared local Contacts folder Using Outlook 2
R Creating a user defined function Outlook VBA and Custom Forms 3
O How to prevent CC from showing when creating a new mail? Using Outlook 1
N Creating a button or link to a form in the Organizational Forms Library Outlook VBA and Custom Forms 3
B Creating an email with the list of tasks Outlook VBA and Custom Forms 0
L Creating drafts when I thought I was sending Using Outlook 1
A Creating Progress Bar or Status Bar Update Outlook VBA and Custom Forms 0
A Are categories still recommended for creating local distribution lists? Using Outlook 3
S Creating Email - Selecting Pre-Defined Text Using Outlook 2
N Creating New Profile Using Outlook 0
Y Creating custom appointment request form with multiple mail recipients Outlook VBA and Custom Forms 5
M creating email from contact file = 3 emails in To field Using Outlook 3
P Recover / Extract Rules from standalone PST file creating RWZ file Using Outlook 2
I Creating meeting invite with disabled tentative button Outlook VBA and Custom Forms 5

Similar threads