Skip i'r prif gynnwys

Sut i grwpio a didoli e-byst yn ôl mis yn Outlook?

Mae e-byst yn cael eu didoli yn ôl y dyddiad a dderbynnir yn y Mewnflwch Rhagolwg yn ddiofyn. Fodd bynnag, nid oes gorchymyn i ddidoli na grwpio pob e-bost erbyn y mis a dderbynnir. Yma, byddaf yn cyflwyno ffordd i grwpio a didoli pob e-bost fesul mis yn Outlook.

Grwpio neu ddidoli e-byst yn ôl mis yn Outlook trwy ddefnyddio cod VBA


Grwpio neu ddidoli e-byst yn ôl mis yn Outlook trwy ddefnyddio cod VBA

Bydd y dull hwn yn eich tywys i greu colofn newydd o'r enw Mis, nesaf cymhwyso macro VBA i echdynnu mis a dderbynnir i'r golofn newydd, ac yna gallwch chi ddidoli neu grwpio pob e-bost yn ôl y golofn Mis yn Outlook.

1.  Agorwch ffolder post lle byddwch chi'n didoli neu'n grwpio e-byst yn ôl mis, a chliciwch ar y Gweld Gosodiadau botwm ar y Gweld tab yn Outlook 2010 a fersiwn ddiweddarach.

doc didoli e-byst erbyn mis 1

Nodyn: Yn Outlook 2007, gallwch glicio ar y Gweld > Gweld Cyfredol > Addaswch yr olygfa gyfredol.

2. Yn y dod Gosodiadau Gweld Uwch / Customize View blwch deialog, cliciwch y colofnau botwm (neu caeau botwm).

doc didoli e-byst erbyn mis 2

3. Yn y Dangos Colofn / Caeau blwch deialog, cliciwch y Colofn Newydd botwm (neu Maes Newydd botwm) i agor blwch deialog Colofn / Maes Newydd, teipiwch Mis yn y Enw blwch, cadwch Testun wedi'i ddewis yn y ddau math blwch a fformat blwch, ac yna cliciwch ar y OK botwm. Gweler y screenshot isod:

doc didoli e-byst erbyn mis 3

4.  Nawr rydych chi'n cyrraedd yn ôl i'r Dangos Colofnau / Meysydd blwch deialog, cliciwch i ddewis y Mis eitem yn y Dangoswch y colofnau hyn (neu caeau) yn y drefn hon blwch, a'i symud o dan y Dderbyniwyd trwy glicio ar Symud i fyny botwm, ac o'r diwedd cliciwch y OK botwm.

doc didoli e-byst erbyn mis 4

5. Cliciwch y OK botwm i gau'r Gosodiadau Gweld Uwch / Customize View blwch deialog.

6. Dewiswch bob e-bost yn y ffolder agoriadol gyda dewis unrhyw e-bost ac yna pwyso'r Ctrl + A allweddi ar yr un pryd.

Nodyn: Os yw'r Pane Darllen yn troi ymlaen, caewch ef gyda chlicio ar y Gweld > Pane Darllen > Oddi ar.

7. Agorwch y Microsoft Visual Basic ar gyfer Ceisiadau ffenestr gyda phwyso'r Alt + F11 allweddi yn y cyfamser, ac yna cliciwch ar y Mewnosod > Modiwlau.

8. Gludwch y macro VBA canlynol i'r modiwl:

VBA: Trefnu neu e-byst grŵp yn ôl mis

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. Pwyswch y F5 allwedd i redeg y macro VBA hwn.

10. Nawr mae mis derbyniol pob e-bost yn cael ei dynnu i'r canlynol Mis colofn. I ddidoli pob e-bost yn ôl mis yn y ffolder agoriadol hon, cliciwch pennawd colofn Mis. Gweler y screenshot:

doc didoli e-byst erbyn mis 5

Nodyn: I grwpio pob e-bost yn ôl mis yn y ffolder agoriadol hon, cliciwch ar y dde ar bennawd colofn Mis, ac yna dewiswch y Grŵp Gan Y Maes Hwn o'r ddewislen clicio ar y dde. Gweler y screenshot:

doc didoli e-byst erbyn mis 6


Offer Cynhyrchiant Swyddfa Gorau

Kutools ar gyfer Rhagolwg - Dros 100 o Nodweddion Pwerus i Werthu Eich Outlook

🤖 Cynorthwy-ydd Post AI: E-byst pro ar unwaith gyda hud AI - un clic i atebion athrylith, tôn berffaith, meistrolaeth amlieithog. Trawsnewid e-bostio yn ddiymdrech! ...

📧 E-bostio Automation: Allan o'r Swyddfa (Ar gael ar gyfer POP ac IMAP)  /  Amserlen Anfon E-byst  /  Auto CC/BCC gan Reolau Wrth Anfon E-bost  /  Awto Ymlaen (Rheolau Uwch)   /  Auto Ychwanegu Cyfarchiad   /  Rhannwch E-byst Aml-Dderbynnydd yn Negeseuon Unigol yn Awtomatig ...

📨 Rheoli E-bost: Dwyn i gof E-byst yn Hawdd  /  Rhwystro E-byst Sgam gan Bynciau ac Eraill  /  Dileu E-byst Dyblyg  /  Chwilio Manwl  /  Cydgrynhoi Ffolderi ...

📁 Ymlyniadau ProArbed Swp  /  Swp Datgysylltu  /  Cywasgu Swp  /  Auto Achub   /  Datgysylltiad Auto  /  Cywasgiad Auto ...

🌟 Rhyngwyneb Hud: 😊Mwy o Emojis Pretty a Cŵl   /  Rhowch hwb i'ch Cynhyrchiant Outlook gyda Golygfeydd Tabbed  /  Lleihau Outlook Yn lle Cau ...

???? Rhyfeddodau un clic: Ateb Pawb ag Ymlyniadau Dod i Mewn  /   E-byst Gwrth-Gwe-rwydo  /  🕘Dangos Parth Amser yr Anfonwr ...

👩🏼‍🤝‍👩🏻 Cysylltiadau a Chalendr: Swp Ychwanegu Cysylltiadau O E-byst Dethol  /  Rhannwch Grŵp Cyswllt i Grwpiau Unigol  /  Dileu Atgoffa Pen-blwydd ...

Dros Nodweddion 100 Aros Eich Archwiliad! Cliciwch Yma i Ddarganfod Mwy.

 

 

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