Note: The other languages of the website are Google-translated. Back to English
Mewngofnodi  \/ 
x
or
x
Cofrestru  \/ 
x

or

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


Kutools for Outlook - Yn Dod â 100 o Nodweddion Uwch i'w Rhagweld, a Gwneud Gwaith yn Haws Osgach!

  • Auto CC / BCC yn ôl rheolau wrth anfon e-bost; Auto Ymlaen E-byst Lluosog yn ôl arfer; Ymateb Auto heb weinydd cyfnewid, a nodweddion mwy awtomatig ...
  • Rhybudd BCC - dangoswch neges pan geisiwch ateb popeth os yw'ch cyfeiriad post yn rhestr BCC; Atgoffwch Wrth Ymlyniadau ar Goll, a mwy o nodweddion atgoffa ...
  • Ymateb (Pawb) Gyda'r Holl Atodiadau yn y sgwrs bost; Ateb Llawer o E-byst mewn eiliadau; Auto Ychwanegu Cyfarchiad wrth ateb; Ychwanegu Dyddiad i'r pwnc ...
  • Offer Ymlyniad: Rheoli Pob Atodiad ym mhob Post, Datgysylltiad Auto, Cywasgu Pawb, Ail-enwi Pawb, Arbed Pawb ... Adroddiad Cyflym, Cyfrif Postiau Dethol...
  • E-byst Sothach Pwerus yn ôl arfer; Tynnwch y Post a Chysylltiadau Dyblyg... Yn eich galluogi i wneud yn ddoethach, yn gyflymach ac yn well yn Outlook.
tab kutools rhagweld kutools tab 1180x121
kutools rhagweld rhagolygon kutools ynghyd â thab 1180x121
 
Say something here...
symbols left.
You are guest
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.
    Armin · 2 months ago
    Strange.
    Made a restart. 
    Now it works.
    Sorry for bothering.

    Thx again :) <3
  • To post as a guest, your comment is unpublished.
    Armin · 2 months ago
    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 www.DeepL.com/Translator (free version)
  • To post as a guest, your comment is unpublished.
    Armin · 2 months ago
    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

    VG
    Armin
  • To post as a guest, your comment is unpublished.
    invisalign@gmail.com · 3 years ago
    This will also help.
  • To post as a guest, your comment is unpublished.
    Nikolay · 3 years 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 · 3 years 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 · 4 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 · 4 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?
    • To post as a guest, your comment is unpublished.
      Carine · 3 years ago
      I want this too
  • To post as a guest, your comment is unpublished.
    Oliver Stoltze · 4 years ago
    Is it possible to create VBA macro to group and sort emails by week?
  • To post as a guest, your comment is unpublished.
    Rizwaan Ansari · 4 years ago
    Isnt there a way to select all emails automatically before the for...next loop?
  • To post as a guest, your comment is unpublished.
    Fariz · 6 years ago
    New mail wont received in specified month category. New mail comes unedr none category. Plz rectify the problem
  • To post as a guest, your comment is unpublished.
    roger · 6 years ago
    This works for emails already in the Inbox, but does NOT create/enter data in the "Month" field for NEW emails!