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

x
?
Solved

Rule to Mark Emails as Read in 7 days

Posted on 2011-02-15
10
Medium Priority
?
288 Views
Last Modified: 2012-05-11
I would like to create a rule so that any emails that are not read in 7 days will automatically appear as read.  I am using Outlook 2010
0
Comment
Question by:stacystyles
[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
  • 4
  • 4
  • 2
10 Comments
 
LVL 1

Expert Comment

by:Anthony2oo5
ID: 34897896
I don't think you can get a rule to do this, but you could make a rule to move the messages to a certain folder and then use auto archive the items after 7 days, and also set auto archive to set it as read.
0
 

Author Comment

by:stacystyles
ID: 34897910
This is what we do right now and just don't like seeing all the unreads.  ;o(
0
 
LVL 1

Expert Comment

by:Anthony2oo5
ID: 34898000
0
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 
LVL 76

Expert Comment

by:David Lee
ID: 34898016
@Anthony2oo5 - Thank you!
0
 

Author Comment

by:stacystyles
ID: 34898027
We still want the emails just want to mark them as read.  Thanks guys!
0
 
LVL 76

Expert Comment

by:David Lee
ID: 34898131
Hi, stacystyles.

That just requires a simple modification to the code.  
Sub MarkMessagesReadAfter7Days()
    Dim olkItems As Outlook.Items
    Set olkItems = Session.GetDefaultFolder(olFolderInbox).Items.Restrict("[UnRead] = True")
    For intCount = olkItems.count To 1 Step -1
        If DateDiff("d", olkItems.Item(intCount).ReceivedTime, Now) >= 7 Then
            olkItems.Item(intCount).Unread = False
            olkItems.Item(intCount).Save
        End If
    Next
    Set olkItems = Nothing
End Sub

Open in new window

0
 

Author Comment

by:stacystyles
ID: 34910199
This looks like it worked.  Any way to run this against sub folders that know of?
0
 
LVL 76

Expert Comment

by:David Lee
ID: 34910325
All subfolders or subfolders under the inbox?
0
 

Author Comment

by:stacystyles
ID: 34910344
Subfolders under the Inbox
0
 
LVL 76

Accepted Solution

by:
David Lee earned 2000 total points
ID: 34910464
This should do it.  Replace the code you have now with this version.
Sub ProcessInboxAndSubfolders()
    MarkMessagesReadAfter7Days Session.GetDefaultFolder(olFolderInbox)
End Sub

Sub MarkMessagesReadAfter7Days(olkFolder As Outlook.MAPIFolder)
    Dim olkItems As Outlook.Items, olkSubfolder As Outlook.MAPIFolder, intCount As Integer
    Set olkItems = olkFolder.Items.Restrict("[UnRead] = True")
    For intCount = olkItems.count To 1 Step -1
        If DateDiff("d", olkItems.Item(intCount).ReceivedTime, Now) >= 7 Then
            olkItems.Item(intCount).Unread = False
            olkItems.Item(intCount).Save
        End If
    Next
    Set olkItems = Nothing
    For Each olkSubfolder In olkFolder.Folders
        MarkMessagesReadAfter7Days olkSubfolder
    Next
    Set olkSubfolder = Nothing
End Sub

Open in new window

0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

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…
In this step by step procedure, you will come to know the details of creating an Outlook meeting in 2007, 2010, 2013 & 2016.
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 …
Many of my clients call in with monstrous Gmail overloading issues with Outlook. A quick tip is to turn off the All Mail and Important folders from synching. Here is a quick video I made to show you how to turn off these and other folders in Gmail s…

636 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