Solved

outlook rule for unread email

Posted on 2015-01-09
5
17 Views
Last Modified: 2016-06-03
Can i create a rule in outlook that moves all UNREAD email from my Inbox older than 30 days to another folder?
0
Comment
Question by:datatechdc
[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
5 Comments
 
LVL 8

Expert Comment

by:Jessie Gill, CISSP
ID: 40541046
There is nothing in the outlook rules wizard that allows this.
0
 
LVL 22

Expert Comment

by:Nick Rhode
ID: 40541047
Rules are applied as email arrives into the inbox.  You might be able to create a manual rule that you can run whenever you want but as for an automatic rule to apply to the mailbox I don't think that is possible with outlook.
0
 
LVL 24

Expert Comment

by:VB ITS
ID: 40541899
As the above experts have mentioned, this is not possible to do within Outlook.

You'll have to look at third party Outlook add-ins to do this. Perhaps have a look at Auto-Mate and see if it can do what you want as it's a pretty powerful add-in for email management. Note that it's not free, however you can trial it for 30 days to see if it can address your issue.
0
 
LVL 76

Accepted Solution

by:
David Lee earned 500 total points
ID: 40553371
datatechdc,

While you cannot do this with a rule, you can do it with a simple macro like the one below.  Let me know what version of Outlook you're using and I'll post instructions for adding the code to Outlook.

Sub MoveUnreadOver30()
    'On the next line, edit the path to the folder you want to move the unread messages to
    Const ARCHIVE_FOLDER_PATH = "Mailbox\SomeFolder"
    Const MACRO_NAME = "Move Unread Message Over 30 Days Old"
    Dim olkInb As Object, olkFld As Object, olkMsg As Object, lngPtr As Long, lngCnt As Long, datMinus30 As Date
    datMinus30 = DateAdd("d", -30, Date)
    Set olkFld = OpenOutlookFolder(ARCHIVE_FOLDER_PATH)
    Set olkInb = Session.GetDefaultFolder(olFolderInbox).Items.Restrict("[Unread] = True AND [ReceivedTime] <= '" & Format(datMinus30, "ddddd h:nn AMPM") & "'")
    For lngPtr = olkInb.Count To 1 Step -1
        If olkMsg.Class = olMail Then
            Set olkMsg = olkInb.Item(lngPtr)
            olkMsg.Move olkFld
            lngCnt = lngCnt + 1
        End If
    Next
    Set olkMsg = Nothing
    Set olkFld = Nothing
    Set olkInb = Nothing
    MsgBox "Operation complete.  I moved " & lngCnt & " messages.", vbInformation + vbOKOnly, MACRO_NAME
End Sub

Private Function OpenOutlookFolder(strFolderPath As String) As Outlook.MAPIFolder
    ' Purpose: Opens an Outlook folder from a folder path.'
    ' Written: 4/24/2009'
    ' Author:  BlueDevilFan'
    ' Outlook: All versions'
    Dim arrFolders As Variant, _
        varFolder As Variant, _
        bolBeyondRoot As Boolean
    On Error Resume Next
    If strFolderPath = "" Then
        Set OpenOutlookFolder = Nothing
    Else
        Do While Left(strFolderPath, 1) = "\"
            strFolderPath = Right(strFolderPath, Len(strFolderPath) - 1)
        Loop
        arrFolders = Split(strFolderPath, "\")
        For Each varFolder In arrFolders
            Select Case bolBeyondRoot
                Case False
                    Set OpenOutlookFolder = Outlook.Session.Folders(varFolder)
                    bolBeyondRoot = True
                Case True
                    Set OpenOutlookFolder = OpenOutlookFolder.Folders(varFolder)
            End Select
            If Err.Number <> 0 Then
                Set OpenOutlookFolder = Nothing
                Exit For
            End If
        Next
    End If
    On Error GoTo 0
End Function

Open in new window

0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying 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

Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

726 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