Emails group by flag status then by weeks or day in outlook 2010

Posted on 2012-09-05
Last Modified: 2013-03-09
In Outlook 2010, if I want to create a folder view that works like this:

[+] Flag Status: Flagged for Follow Up
    [-] Today
    [+] Yesterday
    [+] Last Week... etc

(ie: group by Flag Status, then group by -Date-)

How should I set?
Question by:MRdogbear
    LVL 52

    Expert Comment

    by:Manpreet SIngh Khatra
    In Microsoft Outlook, what options do I have for arranging the contents of my folders?

    This document shows you how to group by additional fields and/or criteria.

    Microsoft Outlook 2010: Sorting Your Emails Messages & Attachment Tips

    - Rancy

    Author Comment

    After I group by flag status, I am not sure how to get outlook to group by
    "last week"
    No matter how I did, the email will group by individually if I take received as second group  by criteria.

    Author Comment

    Hi all
    I figure out how to do it by having the maco running to do this. I will close this now

    Author Comment

    I've requested that this question be closed as follows:

    Accepted answer: 0 points for MRdogbear's comment #a38375959

    for the following reason:

    No one seems know the solution

    Author Comment

    No clmments

    Accepted Solution

    Sure. I did the following

    1.       Create the user defined field first under field chooser as “DateReceived” (case sensitive)
    2.       Enable the macro security to notification level…check the version how to do it online
    3.       Under the vb project create the following code:
    Public WithEvents myInbox As Outlook.Items
    Private Sub Application_Quit()
        Set myInbox = Nothing
    End Sub
    Private Sub Application_Startup()
        Set myInbox = Application.GetNamespace("MAPI").GetDefaultFolder(olFolderInbox).Items
    End Sub
    Private Sub myInbox_ItemAdd(ByVal Item As Object)
        Item.UserProperties.Add "DateReceived", olDateTime
        Item.UserProperties.Item("DateReceived") = DateValue(Item.ReceivedTime)
    End Sub
    Sub AddUserProp()
        Dim olkMsg As Object
        Dim olkProp As Outlook.UserProperty
        For Each olkMsg In Application.ActiveExplorer.Selection
            If olkMsg.Class = 43 Then
                With olkMsg
                    'Change YourPropertyName to the name of your property.'
                    Set olkProp = olkMsg.UserProperties.Add("DateReceived", olDateTime, True)
                    'Change YourPropertyValue to the value you want to assign to your property.'
                    olkProp.Value = DateValue(olkMsg.ReceivedTime)
                End With
            End If
        Set olkMsg = Nothing
       Set olkProp = Nothing
    End Sub
    LVL 11

    Expert Comment

    This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Learn more about the importance of email disclaimers with our top 10 email disclaimer DOs and DON’Ts.
    Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
    The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
    The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

    755 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

    Need Help in Real-Time?

    Connect with top rated Experts

    26 Experts available now in Live!

    Get 1:1 Help Now