跳到主要內容

如何在Outlook中按發件人域排序和分組?

通常,我們可以在Microsoft Outlook中輕鬆按發件人,類別,主題,大小等安排所有電子郵件。 但是,似乎根本無法按發件人域對電子郵件進行分類或分組,因為根本沒有用於電子郵件的“發件人域”字段。 在這裡,我將介紹一個VBA代碼,以幫助您添加電子郵件的“域”列,然後在Outlook中輕鬆按發件人域對電子郵件進行排序和分組。

Office 標籤 - 在 Microsoft Office 中啟用選項卡式編輯和瀏覽,讓工作變得輕而易舉
Kutools for Outlook - 透過 100 多個進階功能增強 Outlook,實現卓越效率
使用這些進階功能增強您的 Outlook 2021 - 2010 或 Outlook 365。 享受全面的 60 天免費試用並提升您的電子郵件體驗!

要在Microsoft Outlook 2013和2010中按發件人域對電子郵件進行排序和分組,請執行以下操作:

步驟1:打開郵件文件夾,您將在其中按發件人域對所有電子郵件進行排序。

步驟2:按一下[關閉],關閉閱讀窗格 閱讀面板 > 關閉 瀏覽 標籤。

步驟3:繼續,然後按一下 添加列 瀏覽 標籤。

第3步:在“顯示列”對話框中,單擊 新列 按鈕。

第4步:在“新建列”對話框中,鍵入 在名稱框中,並保留 文本 在兩者中選擇 類別 盒子和 格式 框,最後單擊 OK 按鈕。

第5步:現在,您回到“顯示列”對話框,選擇 在“按此順序顯示這些列”框中,將其移至下方 項,然後單擊 OK 按鈕。

第6步:現在,您返回到打開的郵件文件夾,按,選擇所有電子郵件。 按Ctrl + A 鑰匙在同一時間。

步驟7:按下 其他 + F11 同時鍵入,以打開“ Microsoft Visual Basic for Applications”窗口; 然後點擊 插入 > 模塊,接下來將以下VBA代碼粘貼到模塊中。

VBA:按發件人域排序和分組

Sub ListSelectionDomain()
Dim aObj As Object
Dim oProp As Outlook.UserProperty
Dim sDomain
On Error Resume Next
For Each aObj In Application.ActiveExplorer.Selection
Set oMail = aObj
sDomain = Right(oMail.SenderEmailAddress, Len(oMail.SenderEmailAddress) - InStr(1, oMail.SenderEmailAddress, "@"))
Set oProp = oMail.UserProperties.Add("Domain", olText, True)
oProp.Value = sDomain
oMail.Save
Err.Clear
Next
End Sub

步驟8:按下 F5 鍵或 按鈕。

步驟9:現在,提取每個發件人的域並將其填充到“域”列中。

A. 要按發件人域對電子郵件進行排序,只需單擊 在所有電子郵件的頂部;

B. 要按發件人域對電子郵件進行分組,只需右鍵單擊的列標題 ,並選擇 按此字段分組 從下拉列表中。 請參閱以下屏幕截圖:

筆記:

(1)此VBA代碼在Outlook 2013和2010中運行良好,但在Outlook 2007中不起作用。
(2)您可以輕鬆保存自定義視圖 如何將視圖設置保存並複製到Outlook中的其他文件夾?


箭頭藍色右氣泡相關文章

如何在Outlook的郵件列表中查看發件人的域?


最佳辦公生產力工具

Kutools for Outlook - 超過 100 種強大的功能可增強您的 Outlook

🤖 人工智慧郵件助手: 具備人工智慧魔力的即時專業電子郵件——一鍵天才回覆、完美語調、多語言掌握。輕鬆改變電子郵件! ……

📧 電子郵件自動化: 外出(適用於 POP 和 IMAP)  /  安排發送電子郵件  /  發送電子郵件時按規則自動抄送/密件副本  /  自動轉送(進階規則)   /  自動添加問候語   /  自動將多收件者電子郵件拆分為單獨的訊息 ...

📨 電子郵件管理: 輕鬆回憶電子郵件  /  按主題和其他人阻止詐騙電子郵件  /  刪除重複的電子郵件  /  進階搜索  /  合併資料夾 ...

📁 附件專業版批量保存  /  批量分離  /  批量壓縮  /  自動保存   /  自動分離  /  自動壓縮 ...

🌟 介面魔法: 😊更多又漂亮又酷的表情符號   /  使用選項卡式視圖提高 Outlook 工作效率  /  最小化 Outlook 而不是關閉 ...

👍 一鍵奇蹟: 使用傳入附件回覆全部  /   反網路釣魚電子郵件  /  🕘顯示寄件者的時區 ...

👩🏼‍🤝‍👩🏻 通訊錄和行事曆: 從選定的電子郵件中大量新增聯絡人  /  將聯絡人群組拆分為各組  /  刪除生日提醒 ...

超過 100特點 等待您的探索! 按此處了解更多。

閱讀更多       免費下載      購買
 

 

Comments (8)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Thanks a lot for this article. It took ages to populate the Domain field values for around 10000 mails, in Outlook 2013. The sadder thing is that it does not sort the mails on the Domain field, either descending or ascending. I don't know what is wrong, some update in Outlook disables this, or because the number of mails are huge. The Domain values are displayed, but not sortable or groupable. Kindly help me fix this, thanks.
This comment was minimized by the moderator on the site
I'd like to do the same thing, but for the eMail Address. What values should be adjusted in the above code?
This comment was minimized by the moderator on the site
Getting an error in Outlook 365 (1705) "You cannot sort by this field."
This comment was minimized by the moderator on the site
thanks for your effort, however, domain field does not behave like From field. When you group by domain and sort by another field, domain field disappears. any workarounds ?
This comment was minimized by the moderator on the site
Hi, In the new Outlook 2016 when you sort inbox by sender it then creates headers. I absolutely hate it. How do i remove the useless headers? It never used to happen before. Thanks, Barbs
This comment was minimized by the moderator on the site
Thanks for this, just tried it out in Outlook 2016 and works a treat. Now the next thing which might not be possible but is there a way to then sort the group by domain messages based on the group by count rather than alphabetically based on the domain text?
This comment was minimized by the moderator on the site
[quote]Thanks for this, just tried it out in Outlook 2016 and works a treat. Now the next thing which might not be possible but is there a way to then sort the group by domain messages based on the group by count rather than alphabetically based on the domain text?By Justin[/quote] I can't find the option to add a column in Office 2016 for Mac - Office 365. Any idea? Thank you.
This comment was minimized by the moderator on the site
Works perfect! Many Thanks!
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations