Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

How to group and sort emails by month in Outlook?

Emails are sorted by received date in the Inbox of Outlook by default. However, there is no command to sort or group all emails by the received month. Here I will introduce a way to group and sort all emails by month in Outlook.

Group or sort emails by month in Outlook by using VBA code


Delete or remove all duplicate emails in all account folders or current account folder:

To remove all duplicate emails in current account folder or all account folders from your Outlook, Kutools for Outlook's Duplicate Emails utility can help you to finish this job as quickly as you can.

doc sort emails by month 7

Kutools for Outlook: with more than 20+ handy Excel add-ins, free to try with no limitation in 60 days. Download and try the free trial now!

Group or sort emails by month in Outlook by using VBA code

This method will guide you to create a new column named as Month, next apply a VBA macro to extract received month into the new column, and then you can sort or group all emails by the Month column in Outlook.

1.  Open a mail folder where you will sort or group emails by month, and click the View Settings button on the View tab in Outlook 2010 and later version.

doc sort emails by month 1

Note: In Outlook 2007, you can click the View > Current View > Customize current view.

2.  In the coming Advanced View Settings/Customize View dialog box, click the Columns button (or Fields button).

doc sort emails by month 2

3.  In the Show Column/Fields dialog box, click the New Column button (or New Field button) to open New Column/Field dialog box, type Month in the Name box, keep Text selected in both Type box and Format box, and then click the OK button. See screenshot below:

doc sort emails by month 3

4.  Now you get back to the Show Columns/Fields dialog box, click to select the Month item in the Show these columns (or Fields) in this order box, and move it below the Received by clicking the Move Up button, and at last click the OK button.

doc sort emails by month 4

5.  Click the OK button to close the Advanced View Settings/Customize View dialog box.

6.  Select all emails in the opening folder with selecting any email and then pressing the Ctrl + A keys simultaneously.

Note: If the Reading Pane is turning on, please close it with clicking the View > Reading Pane > Off.

7.  Open the Microsoft Visual Basic for Applications window with pressing the Alt + F11 keys in a meanwhile, and then click the Insert > Module.

8.  Paste the following VBA macro into the module:

VBA: Sort or group emails by month

Sub ListSelectionMonth()
	Dim aObj As Object
	Dim oProp As Outlook.UserProperty
	Dim sMonth
	
	On Error Resume Next
	
	For Each aObj In Application.ActiveExplorer.Selection
		Set oMail = aObj
		
		sMonth = Month(oMail.ReceivedTime)
		Set oProp = oMail.UserProperties.Add("Month", olText, True)
		oProp.Value = sMonth
		oMail.Save
		
		Err.Clear
	Next
	
End Sub

9.  Press the F5 key to run this VBA macro.

10.  Now each email’s received month is extracted into the following Month column. To sort all emails by month in this opening folder, just click the column header of Month. See screenshot:

doc sort emails by month 5

Note: To group all emails by month in this opening folder, right click the column header of Month, and then select the Group By This Field from the right-clicking menu. See screenshot:

doc sort emails by month 6

 

Recommended Productivity Tools

shot kutools outlook kutools tab 1180x121
shot kutools outlook kutools plus tab 1180x121

Kutools for Outlook - More than 100 Advanced Functions for Outlook, Improve 70% Efficiency For you

  • Complicated and repeated operations can be done a one-time processing in seconds.
  • Forward multiple emails individually with one-click, and auto forward by rules.
  • Auto CC/BCC every sending email and easy for customizing rules, and auto reply without requiring exchange server.
  • Powerful junk emails filter, remove duplicate emails, reply with attachment, bunch of one-click operations, and so on...
  • 60-day unlimited free trial. 60-day money back guarantee. 2 years free upgrade and support. Buy once, use forever.
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    khalid Qureshi · 7 months ago
    This will also help.
  • To post as a guest, your comment is unpublished.
    Nikolay · 7 months ago
    The code works as in the article. But it does not apply to new letters. Every time you need to go to the created module in the Visual Basik and press F5.
  • To post as a guest, your comment is unpublished.
    hanzo · 10 months ago
    I used the above vba and let me begin by saying this does help in micro management which is not available by default. this is beneficial for archival and storage and not something supposed to work automatically for incoming email. I was able to modify this a bit and also add a year column. So for all emails I was able to get a month and year so that I can group and then regroup (by year and then by month). What I did find however is there is some kind of limitation to the number of items it goes through and then exists (not sure why). For example if I were to select a folder with 18k-19k emails, it will loop only through some and then at the end of the run it will not update all the emails with the required. However if you run in smaller batches then it runs perfectly fine. The painful part here is to keep on selecting in batches. This is a pain for people like me who wish to manage or rather arrange years or emails that runs in a 6 figures in numbers. Anyone here been able to figure this out out or willing to go on a troubleshooting spree to fix this or how this can be addressed ?
  • To post as a guest, your comment is unpublished.
    Bhushit Joshipura · 1 years ago
    That is, I want to group mails by subject and put the group with maximum mails on the top. How can I do that?
  • To post as a guest, your comment is unpublished.
    Bhushit Joshipura · 1 years ago
    I want to :

    1. Group mails by subject

    2. Sort them by number of e-mails inside the group

    How can I do achieve this?