Flag Message for Follow Up after sending


Outlook version
Outlook 2019 64-bit
Email Account
Office 365 Exchange
Hi there,

Is there anything wrong with this code.
Sometimes it work sometimes it doesn't work.
Idea is to have an options to flag follow up items for Sent Email.

Private Sub olSentItems_ItemAdd(ByVal Item As Object) On Error Resume Next Dim prompt As String prompt$ = "Do you want to flag this message for followup?" If MsgBox(prompt$, vbYesNo + vbQuestion + vbMsgBoxSetForeground, "Add flag?") = vbYes Then With Item .Categories = "Orange category" .FlagRequest = "Follow up" .Save End With End If End Sub

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
it looks good. Is the question not coming up every time or does it come up but the flag isn't set?

If it's not bringing up the question, comment out the on error resume line - that should bring up the debug message if it errors and you might be able to figure out which line is the problem.
Similar threads
Thread starter Title Forum Replies Date
M How can I customize the Follow Up Flag message in Quick Steps? Using Outlook 1
R Call a Public Sub when a Flag is clicked on in the Message Preview pane Outlook VBA and Custom Forms 1
B on flag message event - create task Outlook VBA and Custom Forms 22
A automatically remove flag from original message when a response was received Using Outlook 2
S Change "This Week" flag start date behavior Using Outlook 1
C-S-R How to clear an Outlook (To Do) Task Flag? Using Outlook 8
A Unflag Inbox and Flag Inbox with Orange Category After Item is send Outlook VBA and Custom Forms 3
N Outlook 2010 Flag blocked for Safe Senders List???? Using Outlook 7
Rupert Dragwater Email flag does not show up in Outlook2013 Using Outlook 13
J Outlook 2013 Extract Flag Completed dates to Excel Macro Outlook VBA and Custom Forms 16
M Setting flag follow up for next business day Outlook VBA and Custom Forms 1
M VBA to change flag status in outlook contact item Outlook VBA and Custom Forms 3
A rule to flag messages not working Using Outlook 5
S set a flag task date as the next weekday Outlook VBA and Custom Forms 4
G Flag for Follow Up with a customized duetime Using Outlook 1
Diane Poremsky How to Easily Change the Private Flag New Slipstick.com Articles 0
A Flag outgoing email messages in Outlook 2010 Outlook VBA and Custom Forms 0
T Customize Outlook flag Using Outlook 1
mikolajek Add on for customized flag operations? Using Outlook 4
Norbert VBA Flag that would indicate the email was sent from Outlook to Access. Outlook VBA and Custom Forms 2
A Custom Flag Form Outlook VBA and Custom Forms 2
S Have Rule or Quick Step PROMPT for custom FLAG Due/Reminder date Outlook VBA and Custom Forms 3
mikecox Missing alarm flag Using Outlook 2
smokiibear follow-up flag fro Tasks in Outlook 2010 Using Outlook 5
D Create additional custom flag descriptions (other than Send E-Mail, Call etc.) Using Outlook 1
L VBA Macro to flag sent emails Using Outlook 1
A Post Form Follow Up Flag Using Outlook 4
S Flag Completion Using Outlook 0
J How to set a flag to follow up using VBA for outlook 2003 Using Outlook 10
F Apply Follow up flag ONLY to the people cc'd. Using Outlook 1
J Macro to periodically sort emails by flag status? Using Outlook 1
2 Flag for Follow up or create new task Using Outlook 1
L Flag settings Using Outlook 1
M Flag outgoing mail by word in body Outlook Wishlist 1
D Setting the Reminder flag in VBA for e-Mails sent to users Outlook VBA and Custom Forms 5
S Adding follow flag for me by macro (MSO2007) Outlook VBA and Custom Forms 3
S Outlook 2016 A Shortcut to recall and delete and sent message. Using Outlook 1
T vba extract data from msg file as attachment file of mail message Outlook VBA and Custom Forms 1
S Unable to extract text from an Outlook email message Using Outlook 2
R Outlook 2016 Message-ID oddity/inconsistency? Using Outlook 7
J Implement Keywords based on body message Outlook VBA and Custom Forms 0
C must select message to trigger safe list Using Outlook 3
witzker HowTo Change message Class of contact form Outlook VBA and Custom Forms 0
D.Moore VB script to Digitaly Sign newly created outlook message Outlook VBA and Custom Forms 2
O VBA Outlook Message Attachment - Array Index Out of Bounds Outlook VBA and Custom Forms 0
W September 2020 - No Default Email Client message after Office Update Using Outlook 1
S Outlook (2016 32bit; Gmail IMAP) - Save sent message to Outllook Folder Outlook VBA and Custom Forms 0
C Why won't Title display in message list? Using Outlook 1
icacream content in this message could not be downloaded.... Using Outlook 2
J Outlook 2016 After a search in all mailboxes, where is each message that was found? Using Outlook 6

Similar threads