メインコンテンツへスキップ

Outlookでメールを月ごとにグループ化して並べ替える方法は?

電子メールは、デフォルトでOutlookの受信トレイで受信日でソートされます。 ただし、すべての電子メールを受信した月でソートまたはグループ化するコマンドはありません。 ここでは、Outlookですべてのメールを月ごとにグループ化して並べ替える方法を紹介します。

VBAコードを使用して、Outlookでメールを月ごとにグループ化または並べ替えます


VBAコードを使用して、Outlookでメールを月ごとにグループ化または並べ替えます

この方法では、Monthという名前の新しい列を作成し、次にVBAマクロを適用して受信した月を新しい列に抽出し、Outlookの[月]列ですべての電子メールを並べ替えたりグループ化したりできます。

1.  メールを月ごとに並べ替えたりグループ化したりするメールフォルダを開き、[ 表示設定 上のボタン 詳しく見る Outlook2010以降のバージョンのタブ。

docはメールを月1で並べ替えます

注: Outlook 2007では、 詳しく見る > 現在のビュー > 現在のビューをカスタマイズする.

2。 今後 詳細ビュー設定/ビューのカスタマイズ ダイアログボックスで コラム ボタン(または フィールズ ボタン)。

docはメールを月2で並べ替えます

3。 の中に 列/フィールドを表示 ダイアログボックスで 新しい列 ボタン(または 新しいフィールド ボタン)[新しい列/フィールド]ダイアログボックスを開くには、次のように入力します セクションに 名前 ボックス、保管 テキスト 両方で選択 タイプ ボックスと フォーマット ボックスをクリックし、 OK ボタン。 以下のスクリーンショットを参照してください。

docはメールを月3で並べ替えます

4.  今、あなたはに戻ります 列/フィールドを表示 ダイアログボックスをクリックして、 の項目 これらの列を表示する (または フィールズ) この順序で ボックスを下に移動します 受信された をクリックすると 上がります ボタンをクリックし、最後にクリックします OK

docはメールを月4で並べ替えます

5。 クリック OK ボタンを押して 詳細ビュー設定/ビューのカスタマイズ ダイアログボックス。

6。 メールを選択してからを押して、オープニングフォルダ内のすべてのメールを選択します Ctrlキー + A キーを同時に押す。

Note読書ペイン がオンになっている場合は、をクリックして閉じてください 詳しく見る > 読書ペイン > オフ.

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で並べ替えます

Note:このオープニングフォルダ内のすべてのメールを月ごとにグループ化するには、の列ヘッダーを右クリックします を選択し、次に このフィールドでグループ化 右クリックメニューから。 スクリーンショットを参照してください:

docはメールを月6で並べ替えます


最高のオフィス生産性向上ツール

Kutools for Outlook - Outlook を強化する 100 以上の強力な機能

🤖 AIメールアシスタント: AI の魔法を備えたインスタント プロのメール - ワンクリックで天才的な返信、完璧な口調、多言語の習得。メールを簡単に変革しましょう! ...

📧 自動メール: 不在時 (POP および IMAP で利用可能)  /  メール送信のスケジュール設定  /  メール送信時のルールによる自動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