如何在 Outlook 中自动突出显示您尚未回复的重要电子邮件

立即分享:

为了记住回复重要的电子邮件,您可能希望 Outlook 以特定的清单颜色显示您未回复的重要电子邮件以突出显示它们。 现在,本文将教您如何获取它。

你有没有错过任何重要的电子邮件而没有及时回复? 如果您遇到过此类问题,也许您会希望 Outlook 能够突出显示您未回复的重要邮件。 下面,我们就来指导大家用VBA来实现。 如果你不熟悉 VBA,请参考我之前的文章——》如何在 Outlook 中运行 VBA 代码“ 同时。

自动突出显示您未回复的重要电子邮件

  1. 首先,在 Outlook 中通过“Alt + F11”访问 VBA 编辑器。
  2. 然后,在新窗口中,将下面的代码复制到“ThisOutlookSession”项目中。
Private WithEvents objSentFolder As Outlook.Folder
Private WithEvents objSentMails As Outlook.Items
Private objInbox As Outlook.Folder

'On startup, auto update the replied status of the emails in Inbox
Private Sub Application_Startup()
    Set objSentFolder = Outlook.Application.Session.GetDefaultFolder(olFolderSentMail)
    Set objSentMails = objSentFolder.Items
    Set objInbox = Outlook.Application.Session.GetDefaultFolder(olFolderInbox)
    Call UpdateRepliedStatus(objInbox)
End Sub

'After sending an email, auto update the replied status of the emails in Inbox
Private Sub objSentMails_ItemAdd(ByVal Item As Object)
    If Item.Class = olMail Then
       Call UpdateRepliedStatus(objInbox)
    End If
End Sub

Private Sub UpdateRepliedStatus(ByVal objFolder As Outlook.Folder)
    Dim i As Long
    Dim objMail As Outlook.MailItem
    Dim objRepliedProperty As Outlook.UserProperty
    Dim strRepliedStatus As String
 
    'Write the replied status to a new user property of emails
    For i = objFolder.Items.Count To 1 Step -1
        If objFolder.Items(i).Class = olMail Then
           Set objMail = objFolder.Items(i)
 
           Set objRepliedProperty = objMail.UserProperties.Find("Replied", True)
           If objRepliedProperty Is Nothing Then
              Set objRepliedProperty = objMail.UserProperties.Add("Replied", olText, True)
           End If
 
           strRepliedStatus = objMail.PropertyAccessor.GetProperty("http://schemas.microsoft.com/mapi/proptag/0x10810003")
           If (Not (strRepliedStatus = 102)) And (Not (strRepliedStatus = 103)) Then
              objRepliedProperty.Value = "No"
           Else
              objRepliedProperty.Value = "Yes"
           End If
 
           objMail.Save
        End If
    Next
End Sub

VBA 代码 - 自动更新电子邮件的回复状态

  1. 之后,将光标移到“Application_Startup”宏中,然后按“F5”。
  2. 稍后,关闭此窗口。
  3. 随后,按照以下步骤为收件箱中的项目创建条件格式规则。
  • 首先,切换到“收件箱”文件夹。
  • 然后,转到“查看”选项卡并单击“查看设置”。
  • 在新对话框中,单击“条件格式”按钮。“条件格式”
  • 在接下来的“条件格式”对话框中,单击“添加”并为新规则输入名称,例如“未回复的重要电子邮件”。创建新的条件格式规则
  • 之后,单击“字体...”按钮,在弹出的“字体”对话框中设置字体样式和颜色。设置字体
  • 指定字体后,点击“条件格式”对话框中的“条件...”。
  • 随后,在“过滤器”屏幕的“高级”选项卡上,添加两个过滤器。
  1. “重要性”>“等于”>“高”
  2. “回复”>“是(完全)”>“否”添加两个过滤器
  • 最后,单击一系列“确定”以保存此格式规则。
  1. 返回收件箱后,您未回复的所有重要邮件均已以特定字体和颜色突出显示。突出显示您未回复的重要电子邮件

不要懈怠 Outlook 数据保护

许多用户仍然认为数据损坏永远不会发生在自己身上。但实际上,这种想法完全错误且风险极大。大多数情况下,一个小小的失误就可能导致数据丢失。例如,如果您不小心点击了未知电子邮件中的恶意链接,您的 Outlook 文件可能会感染病毒甚至损坏。因此,您应该始终保持警惕,做好数据保护工作,例如定期备份 PST 文件并准备一个强大的修复工具,例如 DataNumen Outlook Repair,这可以 修复Outlook 问题在一瞬间。

作者简介:

Shirley Zhang 是一位数据恢复专家 DataNumen, Inc.,它是数据恢复技术领域的世界领先者,包括 恢复 mdf 和 outlook 修复软件产品。 欲了解更多信息,请访问 datanumen.com

立即分享:

评论被关闭。