ไปยังเนื้อหาหลัก

วิธีจัดกลุ่มและจัดเรียงอีเมลตามเดือนใน Outlook

อีเมลจะเรียงลำดับตามวันที่ได้รับในกล่องขาเข้าของ Outlook ตามค่าเริ่มต้น อย่างไรก็ตามไม่มีคำสั่งให้จัดเรียงหรือจัดกลุ่มอีเมลทั้งหมดตามเดือนที่ได้รับ ที่นี่ฉันจะแนะนำวิธีการจัดกลุ่มและจัดเรียงอีเมลทั้งหมดตามเดือนใน Outlook

จัดกลุ่มหรือจัดเรียงอีเมลตามเดือนใน Outlook โดยใช้รหัส VBA


จัดกลุ่มหรือจัดเรียงอีเมลตามเดือนใน Outlook โดยใช้รหัส VBA

วิธีนี้จะแนะนำให้คุณสร้างคอลัมน์ใหม่ชื่อเดือนจากนั้นใช้แมโคร VBA เพื่อแยกเดือนที่ได้รับลงในคอลัมน์ใหม่จากนั้นคุณสามารถจัดเรียงหรือจัดกลุ่มอีเมลทั้งหมดตามคอลัมน์เดือนใน Outlook

1.  เปิดโฟลเดอร์อีเมลที่คุณจะจัดเรียงหรือจัดกลุ่มอีเมลตามเดือนแล้วคลิก ดูการตั้งค่า ปุ่มบน รายละเอียด ใน Outlook 2010 และเวอร์ชันที่ใหม่กว่า

doc จัดเรียงอีเมลตามเดือน 1

หมายเหตุ ใน Outlook 2007 คุณสามารถคลิกไฟล์ รายละเอียด > มุมมองปัจจุบัน > ปรับแต่งมุมมองปัจจุบัน.

2. ที่กำลังจะมาถึง การตั้งค่ามุมมองขั้นสูง / ปรับแต่งมุมมอง ใหคลิกปุ the ม คอลัมน์ ปุ่ม (หรือ สาขา ปุ่ม).

doc จัดเรียงอีเมลตามเดือน 2

3. ใน แสดงคอลัมน์ / เขตข้อมูล ใหคลิกปุ the ม คอลัมน์ใหม่ ปุ่ม (หรือ ฟิลด์ใหม่ เพื่อเปิดกล่องโต้ตอบคอลัมน์ / ฟิลด์ใหม่ให้พิมพ์ เดือน ใน Name กล่องเก็บ ข้อความ เลือกทั้งสองอย่าง ชนิดภาพเขียน กล่องและ รูปแบบ จากนั้นคลิกที่ไฟล์ OK ปุ่ม. ดูภาพหน้าจอด้านล่าง:

doc จัดเรียงอีเมลตามเดือน 3

4.  ตอนนี้คุณกลับไปที่ไฟล์ แสดงคอลัมน์ / เขตข้อมูล กล่องโต้ตอบคลิกเพื่อเลือกไฟล์ เดือน รายการใน แสดงคอลัมน์เหล่านี้ (หรือ สาขา) ตามลำดับนี้ และย้ายไปไว้ด้านล่างของไฟล์ ที่ได้รับ โดยการคลิกที่ ย้ายขึ้น และคลิกสุดท้ายที่ OK ปุ่ม

doc จัดเรียงอีเมลตามเดือน 4

5. คลิก OK เพื่อปิด การตั้งค่ามุมมองขั้นสูง / ปรับแต่งมุมมอง กล่องโต้ตอบ

6. เลือกอีเมลทั้งหมดในโฟลเดอร์เปิดโดยเลือกอีเมลใดก็ได้จากนั้นกดปุ่ม Ctrl + A คีย์พร้อมกัน

หมายเหตุ: ถ้า บานหน้าต่างการอ่าน กำลังเปิดอยู่โปรดปิดโดยคลิกที่ไฟล์ รายละเอียด > บานหน้าต่างการอ่าน > Off.

7. เปิด Microsoft Visual Basic สำหรับแอปพลิเคชัน หน้าต่างด้วยการกดปุ่ม อื่น ๆ + F11 ในขณะเดียวกันจากนั้นคลิกที่ สิ่งที่ใส่เข้าไป > โมดูล.

8. วางมาโคร VBA ต่อไปนี้ลงในโมดูล:

VBA: จัดเรียงหรือจัดกลุ่มอีเมลตามเดือน

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. กด F5 กุญแจสำคัญในการเรียกใช้แมโคร VBA นี้

10. ตอนนี้แต่ละเดือนที่ได้รับอีเมลจะแยกออกเป็นดังต่อไปนี้ เดือน คอลัมน์. หากต้องการจัดเรียงอีเมลทั้งหมดตามเดือนในโฟลเดอร์เปิดนี้เพียงคลิกที่ส่วนหัวของคอลัมน์ เดือน. ดูภาพหน้าจอ:

doc จัดเรียงอีเมลตามเดือน 5

หมายเหตุ: หากต้องการจัดกลุ่มอีเมลทั้งหมดตามเดือนในโฟลเดอร์เปิดนี้ให้คลิกขวาที่ส่วนหัวของคอลัมน์ เดือนจากนั้นเลือก จัดกลุ่มตามฟิลด์นี้ จากเมนูคลิกขวา ดูภาพหน้าจอ:

doc จัดเรียงอีเมลตามเดือน 6


สุดยอดเครื่องมือเพิ่มผลผลิตในสำนักงาน

Kutools สำหรับ Outlook - คุณสมบัติอันทรงพลังมากกว่า 100 รายการเพื่อเติมพลังให้กับ Outlook ของคุณ

🤖 ผู้ช่วยจดหมาย AI: ส่งอีเมลระดับมืออาชีพทันทีด้วยเวทมนตร์ AI คลิกเพียงครั้งเดียวเพื่อตอบกลับอย่างชาญฉลาด น้ำเสียงที่สมบูรณ์แบบ การเรียนรู้หลายภาษา เปลี่ยนรูปแบบการส่งอีเมลอย่างง่ายดาย! ...

📧 การทำงานอัตโนมัติของอีเมล: ไม่อยู่ที่สำนักงาน (ใช้ได้กับ POP และ IMAP)  /  กำหนดการส่งอีเมล  /  Auto CC/BCC ตามกฎเมื่อส่งอีเมล  /  ส่งต่ออัตโนมัติ (กฎขั้นสูง)   /  เพิ่มคำทักทายอัตโนมัติ   /  แบ่งอีเมลผู้รับหลายรายออกเป็นข้อความส่วนตัวโดยอัตโนมัติ ...

📨 การจัดการอีเมล์: เรียกคืนอีเมลได้อย่างง่ายดาย  /  บล็อกอีเมลหลอกลวงตามหัวเรื่องและอื่นๆ  /  ลบอีเมลที่ซ้ำกัน  /  การค้นหาขั้นสูง  /  รวมโฟลเดอร์ ...

📁 ไฟล์แนบโปรบันทึกแบทช์  /  การแยกแบทช์  /  การบีบอัดแบบแบตช์  /  บันทึกอัตโนมัติ   /  ถอดอัตโนมัติ  /  บีบอัดอัตโนมัติ ...

🌟 อินเตอร์เฟซเมจิก: 😊อีโมจิที่สวยและเจ๋งยิ่งขึ้น   /  เพิ่มประสิทธิภาพการทำงาน Outlook ของคุณด้วยมุมมองแบบแท็บ  /  ลดขนาด Outlook แทนที่จะปิด ...

???? เพียงคลิกเดียวสิ่งมหัศจรรย์: ตอบกลับทั้งหมดด้วยไฟล์แนบที่เข้ามา  /   อีเมลต่อต้านฟิชชิ่ง  /  🕘 แสดงโซนเวลาของผู้ส่ง ...

👩🏼‍🤝‍👩🏻 รายชื่อและปฏิทิน: แบทช์เพิ่มผู้ติดต่อจากอีเมลที่เลือก  /  แบ่งกลุ่มผู้ติดต่อเป็นกลุ่มแต่ละกลุ่ม  /  ลบการแจ้งเตือนวันเกิด ...

เกิน คุณสมบัติ 100 รอการสำรวจของคุณ! คลิกที่นี่เพื่อค้นพบเพิ่มเติม

 

 

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