Bỏ qua nội dung chính

Làm cách nào để nhóm và sắp xếp email theo tháng trong Outlook?

Email được sắp xếp theo ngày nhận trong Hộp thư đến của Outlook theo mặc định. Tuy nhiên, không có lệnh nào để sắp xếp hoặc nhóm tất cả các email theo tháng đã nhận. Sau đây tôi sẽ giới thiệu một cách để nhóm và sắp xếp tất cả các email theo tháng trong Outlook.

Nhóm hoặc sắp xếp email theo tháng trong Outlook bằng cách sử dụng mã VBA


Nhóm hoặc sắp xếp email theo tháng trong Outlook bằng cách sử dụng mã VBA

Phương pháp này sẽ hướng dẫn bạn tạo một cột mới có tên là Tháng, tiếp theo áp dụng macro VBA để trích xuất tháng đã nhận vào cột mới, sau đó bạn có thể sắp xếp hoặc nhóm tất cả các email theo cột Tháng trong Outlook.

1.  Mở một thư mục thư nơi bạn sẽ sắp xếp hoặc nhóm các email theo tháng và nhấp vào Giao diện cài đặt nút trên Xem trong Outlook 2010 và phiên bản mới hơn.

doc sắp xếp email theo tháng 1

Lưu ý: Trong Outlook 2007, bạn có thể nhấp vào Xem > Chế độ xem hiện tại > Tùy chỉnh chế độ xem hiện tại.

2. Trong thời gian tới Cài đặt chế độ xem nâng cao / Tùy chỉnh chế độ xem hộp thoại, nhấp vào Cột nút (hoặc Lĩnh vực cái nút).

doc sắp xếp email theo tháng 2

3. bên trong Hiển thị Cột / Trường hộp thoại, nhấp vào Cột mới nút (hoặc Dòng mới nút) để mở hộp thoại Cột / Trường Mới, nhập tháng trong Họ tên hộp, giữ bản văn được chọn trong cả hai Kiểu hộp và Định dạng và sau đó bấm vào OK cái nút. Xem ảnh chụp màn hình bên dưới:

doc sắp xếp email theo tháng 3

4.  Bây giờ bạn quay trở lại Hiển thị Cột / Trường hộp thoại, bấm để chọn tháng mục trong Hiển thị các cột này (Hoặc Lĩnh vực) theo thứ tự này và di chuyển nó bên dưới Nhận được bằng cách nhấp vào Move Up và cuối cùng nhấp vào OK .

doc sắp xếp email theo tháng 4

5. Nhấn vào OK nút để đóng Cài đặt chế độ xem nâng cao / Tùy chỉnh chế độ xem hộp thoại.

6. Chọn tất cả các email trong thư mục mở bằng cách chọn bất kỳ email nào và sau đó nhấn Ctrl + A các phím đồng thời.

Chú thích: Nếu Ngăn đọc đang bật, vui lòng đóng nó bằng cách nhấp vào Xem > Ngăn đọc > tắt.

7. Mở Microsoft Visual Basic cho các ứng dụng cửa sổ bằng cách nhấn Khác + F11 trong khi đó, rồi bấm vào Chèn > Mô-đun.

8. Dán macro VBA sau vào mô-đun:

VBA: Sắp xếp hoặc nhóm email theo tháng

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. Nhấn nút F5 phím để chạy macro VBA này.

10. Giờ đây, mỗi tháng nhận được email được trích xuất thành phần sau tháng cột. Để sắp xếp tất cả các email theo tháng trong thư mục mở này, chỉ cần nhấp vào tiêu đề cột của tháng. Xem ảnh chụp màn hình:

doc sắp xếp email theo tháng 5

Chú thích: Để nhóm tất cả các email theo tháng trong thư mục mở này, hãy nhấp chuột phải vào tiêu đề cột của tháng, và sau đó chọn Nhóm theo trường này từ menu chuột phải. Xem ảnh chụp màn hình:

doc sắp xếp email theo tháng 6


Công cụ năng suất văn phòng tốt nhất

Kutools cho Outlook - Hơn 100 tính năng mạnh mẽ để tăng cường Outlook của bạn

🤖 Trợ lý thư AI: Email chuyên nghiệp tức thì với phép thuật AI--một cú nhấp chuột để có câu trả lời xuất sắc, giọng điệu hoàn hảo, khả năng thông thạo đa ngôn ngữ. Chuyển đổi email một cách dễ dàng! ...

📧 Tự động hoá email: Vắng Mặt (Có sẵn cho POP và IMAP)  /  Lên lịch gửi email  /  Tự động CC/BCC theo quy định khi gửi Email  /  Tự động chuyển tiếp (Quy tắc nâng cao)   /  Tự động thêm lời chào   /  Tự động chia email nhiều người nhận thành các tin nhắn riêng lẻ hữu ích. Cảm ơn !

📨 Quản lý email: Dễ dàng thu hồi email  /  Chặn email lừa đảo theo chủ đề và những người khác  /  Xóa các email trùng lặp  /  Tìm Kiếm Nâng Cao  /  Hợp nhất các thư mục hữu ích. Cảm ơn !

📁 Tệp đính kèm chuyên nghiệpLưu hàng loạt  /  Tách hàng loạt  /  Nén hàng loạt  /  Tự động lưu   /  Tự động tách  /  Tự động nén hữu ích. Cảm ơn !

🌟 Giao diện ma thuật: 😊Thêm nhiều biểu tượng cảm xúc đẹp và thú vị hơn   /  Tăng năng suất Outlook của bạn với chế độ xem theo thẻ  /  Thu nhỏ Outlook thay vì đóng hữu ích. Cảm ơn !

👍 Kỳ quan chỉ bằng một cú nhấp chuột: Trả lời tất cả bằng tệp đính kèm đến  /   Email chống lừa đảo  /  🕘Hiển thị múi giờ của người gửi hữu ích. Cảm ơn !

👩🏼‍🤝‍👩🏻 Danh bạ & Lịch: Thêm hàng loạt liên hệ từ các email đã chọn  /  Chia nhóm liên hệ thành các nhóm riêng lẻ  /  Xóa lời nhắc sinh nhật hữu ích. Cảm ơn !

Trên 100 tính năng Chờ đợi sự khám phá của bạn! Bấm vào đây để khám phá thêm.

 

 

Comments (14)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
I have Outlook 2007 and have try that VBA. First I did have the problem that only 1 E-Mail of all get the month show.
I needed to mark all E-Mails first and then push in VBA F5 to show in all E-Mails the month.

a bad part of that code is that all month (1, 2, 3, 4, 5, 6, 7, 8, 9) get grouped on the wrong position in front of 10, 11, 12
is there any additional VBA sequence what add to the first 9 Month a 0? ergo 01, 02, 03 etc?

as I have several years in some folders it make sense to group those E-Mails first by year and after that by Month.
This comment was minimized by the moderator on the site
Strange.
Made a restart. Now it works.Sorry for bothering.
Thx again :) <3
This comment was minimized by the moderator on the site
Sorry. Didn't saw that the page is origin in english. #emabarrased
Google translate is getting better. :D
Hello from Hamburg,
great stuff. Thanks for this. :)
Only a small problem.
I had first adapted the code so that it puts the year and month together for me.

Sub ListSelectionYearMonth()
Dim aObj As Object
Dim oProp As Outlook.UserProperty
Dim oMail As Object
Dim sMonth
Dim sYear
Dim sYearMonth

On Error Resume Next

For Each aObj In Application.ActiveExplorer.Selection
Set oMail = aObj

sMonth = Month(oMail.ReceivedTime)
sYear = Year(oMail.ReceivedTime)

If sMonth < 10 Then
sMonth = 0 & sMonth
Else
sMonth = sMonth
End If

sYearMonth = sYear & "/" & sMonth
Set oProp = oMail.UserProperties.Add("YearMonth", olText, True)
oProp.Value = sYearMonth
oMail.Save

Err.Clear
Next

End Sub

This worked wonderfully.
Now I noticed in a folder that a grouping first by year and then by month increases the clarity.
I used the original code.
However, the column there remains empty.

Sub ListSelectionMonth()
Dim aObj As Object
Dim oProp As Outlook.UserProperty
Dim oMail As Object
Dim sMonth

On Error Resume Next

For Each aObj In Application.ActiveExplorer.Selection
Set oMail = aObj

sMonth = Month(oMail.ReceivedTime)

If sMonth < 10 Then
sMonth = 0 & sMonth
Else
sMonth = sMonth
End If

Set oProp = oMail.UserProperties.Add("Month", olText, True)
oProp.Value = sMonth
oMail.Save

Err.Clear
Next

End Sub

I'm a bit perplexed at the moment.

Glad about any advice

VG
Armin


Translated with http://www.DeepL.com/Translator (free version)
This comment was minimized by the moderator on the site
Hallo aus Hamburg,super Sache. Danke dafür. :)Kleines Problem nur.Ich hatte zuerst den Code so angepasst das er mir Jahr und Monat zusammensetzt.
Sub ListSelectionYearMonth()
Dim aObj As Object
Dim oProp As Outlook.UserProperty
Dim oMail As Object
Dim sMonth
Dim sYear
Dim sYearMonth

On Error Resume Next

For Each aObj In Application.ActiveExplorer.Selection
Set oMail = aObj

sMonth = Month(oMail.ReceivedTime)
sYear = Year(oMail.ReceivedTime)

If sMonth < 10 Then
sMonth = 0 & sMonth
Else
sMonth = sMonth
End If

sYearMonth = sYear & "/" & sMonth
Set oProp = oMail.UserProperties.Add("JahrMonat", olText, True)
oProp.Value = sYearMonth
oMail.Save

Err.Clear
Next

End Sub

Hat wunderbar geklappt.Nun ist mir in einem Ordner aufgefallen das eine Gruppierung zuersnach Jahr und dann nach Monat die Übersichtlichkeit noch erhöht.Habe als den ursprünglichen Code genommen.Dort bleibt dann allerdings die Spalte leer.
Sub ListSelectionMonth()
Dim aObj As Object
Dim oProp As Outlook.UserProperty
Dim oMail As Object
Dim sMonth

On Error Resume Next

For Each aObj In Application.ActiveExplorer.Selection
Set oMail = aObj

sMonth = Month(oMail.ReceivedTime)

If sMonth < 10 Then
sMonth = 0 & sMonth
Else
sMonth = sMonth
End If

Set oProp = oMail.UserProperties.Add("Monat", olText, True)
oProp.Value = sMonth
oMail.Save

Err.Clear
Next

End Sub

Macht mich grad etwas ratlos.
Freue mich über jeden Rat
VGArmin
This comment was minimized by the moderator on the site
This will also help.
This comment was minimized by the moderator on the site
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.
This comment was minimized by the moderator on the site
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 ?
This comment was minimized by the moderator on the site
That is, I want to group mails by subject and put the group with maximum mails on the top. How can I do that?
This comment was minimized by the moderator on the site
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?
This comment was minimized by the moderator on the site
I want this too
This comment was minimized by the moderator on the site
Is it possible to create VBA macro to group and sort emails by week?
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations