VBOffice

Delete Email Follow-up Flag when Completed

The script completely removes the flag once the item is completed.

Last modified: 2007/03/15 | Accessed: 51.056  | #46
◀ Previous sample Next sample ▶
ReplyAll ReplyAll
ReplyAll alerts you before unintentionally replying all, or if you are a confidential BCC recipient of the e-mail.

When you mark a flagged item completed, Outlook displays the message striked with a checkmark. In contrast, this script completely removes the follow-up flag.


tip  How to add macros to Outlook
Private WithEvents m_Explorer As Outlook.Explorer
Private WithEvents m_Mail As Outlook.MailItem
Private m_IgnoreEvent As Boolean

Private Sub Application_Startup()
  Set m_Explorer = Application.ActiveExplorer
End Sub

Private Sub m_Explorer_SelectionChange()
  Dim obj As Object
  Dim Sel As Outlook.Selection

  Set m_Mail = Nothing

  Set Sel = m_Explorer.Selection
  If Sel.Count Then
    Set obj = Sel(1)
    If TypeOf obj Is Outlook.MailItem Then
      Set m_Mail = obj
    End If
  End If
End Sub

Private Sub m_Mail_PropertyChange(ByVal Name As String)
  On Error Resume Next

  If m_IgnoreEvent = False Then
    If Name = "FlagStatus" Then
      If m_Mail.FlagStatus = olFlagComplete Then
        m_IgnoreEvent = True
        m_Mail.FlagStatus = olNoFlag
        m_Mail.Save
        m_IgnoreEvent = False
      End If
    End If
  End If
End Sub
Category-Manager Category-Manager
With Category-Manager you can group your Outlook categories, share them with other users, filter a folder by category, automatically categorize new emails, and more. You can use the Addin even for IMAP.
email  Send a message