Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Thread Tools Display Modes
Old 08-07-2019, 07:35 AM
goozer321 goozer321 is offline Automatic Flags Windows 10 Automatic Flags Office 2016
Automatic Flags
Join Date: Aug 2019
Posts: 1
goozer321 is on a distinguished road
Default Automatic Flags


I find flagging emails incredibly useful - when I remember to do it - especially for follow up purposes.

Unfortunately, I often forget to flag an email I just sent - is there any way to be prompted whether I want to flag a sent email?

Reply With Quote
Old 08-07-2019, 11:21 PM
gmayor's Avatar
gmayor gmayor is offline Automatic Flags Windows 10 Automatic Flags Office 2016
Join Date: Aug 2014
Posts: 3,077
gmayor is just really nicegmayor is just really nicegmayor is just really nicegmayor is just really nicegmayor is just really nice

You cannot flag a message until after it has been sent and appears in the Sent Items folder. You can intercept it there and choose whether to flag it using macros in the ThisOutlookSession folder of Outlook.

You will either have to run the macro Application_Startup manually or restart Outlook to run it. It then checks when items are added to the sent items folder, checks that they are messages and established whether they are already flagged or not. If not it will prompt to ask if you want to set a flag to the message with the subject and recipient named in the message, then either set a flag or not as chosen.

Option Explicit

Private WithEvents Items As Outlook.Items

Private Sub Application_Startup()
    Exit Sub
End Sub

Public Sub SetItems()
    Set Items = Application.GetNamespace("MAPI").GetDefaultFolder(olFolderSentMail).Items
    Exit Sub
End Sub

Private Sub items_ItemAdd(ByVal Item As Object)
    If TypeName(Item) = "MailItem" Then
        If Not Item.IsMarkedAsTask = True Then
            If MsgBox("Subject: " & Item.Subject & vbCr & _
                      "To: " & Item.To & vbCr & vbCr & _
                      "Message is not flagged. Do you wish to flag the message?", vbYesNo) = vbYes Then
                Item.MarkAsTask olMarkNoDate
            End If
        End If
    End If
    Exit Sub
End Sub
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes
Reply With Quote

Thread Tools
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
Flags Tagliaboo Outlook 5 05-05-2017 06:18 AM
Changing color font between 2 specific flags RupertM Word VBA 4 05-24-2014 04:47 AM
moving follow up flags - outlook 2003 Newmarket2 Outlook 0 01-13-2013 04:46 PM
automatically manage flags zolw Outlook 0 12-19-2010 03:58 PM
Document flags nearly all words Jan Te Lagen Word 0 02-22-2010 09:07 AM

All times are GMT -7. The time now is 08:46 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2020 DragonByte Technologies Ltd. is not affiliated with Microsoft