Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

outlook rule for unread email

Posted on 2015-01-09
5
Medium Priority
?
72 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 2000 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: 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

Large Outlook files lead to various unwanted errors and corruption issues. Furthermore, large outlook files can also make Outlook take longer to start-up, search, navigate, and shut-down. So, In this article, i will discuss a method to make your Out…
Mailbox Overload?
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
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: …

618 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