How to Auto Set Follow up Flag for a Contact and Pop up a Reminder When His Birthday Is Today

If you hope that Outlook can automatically flag a contact for follow up and remind you if his birthday is today, you can use the VBA codes introduced in this article to achieve it.

As we know, when you fill in the contact birthday field, Outlook will auto create the birthday appointments in the calendar. However, actually, many dislike such appointments since they will clutter up the schedules. Therefore, as Outlook also allows users to flag contacts for follow up, like flagging emails, so you may desire to enable the follow-up flag and set a reminder on the contacts if today are their birthdays. To flexibly use the flag, you must hope that Outlook can automatically flag the contacts on basis of their birthdays. Although Outlook doesn’t offer such a native feature, you can use the following VBA codes to get it.

Auto Set Follow up Flag for a Contact and Pop up a Reminder When His Birthday Is Today

Auto Set Follow up Flag for a Contact and Pop up a Reminder When His Birthday Is Today

  1. To start with, launch Outlook program.
  2. Then switch to “Developer” tab and hit the “Visual Basic” button.
  3. In the next “Microsoft Visual Basic for Applications” window, you can open the “ThisOutlookSession” project.
  4. Subsequently, copy the following VBA codes into this project window.
Private Sub Application_Startup()
    'Run the following subroutine as soon as Outlook starts
    Call FlagContactsIfBirthdaysAreToday
End Sub

Private Sub FlagContactsIfBirthdaysAreToday()
    Dim objContacts As Outlook.Items
    Dim objItem As Object
    Dim objContact As Outlook.ContactItem
    Dim strToday As String
    Dim strBirthday As String
 
    strToday = Month(Date) & "-" & Day(Date)
    Set objContacts = Outlook.Application.Session.GetDefaultFolder(olFolderContacts).Items
 
    For Each objItem In objContacts
        If objItem.Class = olContact Then
           Set objContact = objItem
           strBirthday = Month(objContact.Birthday) & "-" & Day(objContact.Birthday)
 
           'Flag the contacts whose birthdays are today
           If strBirthday = strToday Then
              With objContact
                   .MarkAsTask olMarkToday
                   'Remind you right now
                   .ReminderSet = True
                   .ReminderTime = Now
                   .Save
              End With
           'Clear the flags on the contacts whose birthdays are not today
           Else
              With objContact
                   .ClearTaskFlag
                   .Save
              End With
           End If
        End If
    Next objItem
End Sub

VBA Code - Auto Set Follow up Flag for a Contact and Pop up a Reminder When His Birthday is Today

  1. After that, assign a digital certificate to the current VBA project.
  2. Later change your Outlook macro settings to permit the signed macro.
  3. Eventually, you can restart Outlook to activate this macro.
  4. Whenever you start your Outlook, all the contacts whose birthdays are today will be automatically flagged and set with a reminder at the current time. It looks like the following screenshot.Set Follow up Flag for a Contact

Cope with Terrible PST Errors

Due to the fact that PST is error prone, if you’ve utilized Outlook for decades, you must have encountered various PST issues, like internal PST errors, damaged PST file and so on. At this point, you can firstly use inbuilt repair tool – Scanpst.exe. If it fails, you can recur to a more experienced repair tool, like DataNumen Outlook Repair.

Author Introduction:

Shirley Zhang is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including recover sql and outlook repair software products. For more information visit www.datanumen.com

Comments are closed.