Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

How to prevent Outlook reminding too early or too late?

For example, you work from 9:00 am to 6:00 pm every day, but now you are making an appointment at 10:00 am and add a reminder of 2 hours for it in Outlook. That’s mean the reminder will work at 8:00 am before your work beginning. On the other hand, the reminder may sound in the midnight in special cases. That’s quite inconvenient, and some Outlook users may want to prevent Outlook reminding too early or too late. Here I will introduce a VBA macro for you to solve it in Outlook.

Kutools for Outlook: 100+ New Advanced Tools for Outlook.
Office Tab: Enable Tabbed Editing and Browsing in Office, Just Like Chrome, Firefox, IE 8/9/10.
Classic Menu: Bring Old Menus and Toolbars Back to Office 2007, 2010, 2013, 2016 and 2019.

To prevent Outlook reminding too early or too late, you can do as following:

Step 1: Press the Alt + F11 keys in the meanwhile to open the Microsoft Visual Basic for Applications window.

Step 2: Expand the Microsoft Outlook Objects in the left pane, and paste the following VBA macro into the ThisOutlookSession.

VBA: Prevent remind too early or too late in Outlook

Public WithEvents g_CalendarItems As Outlook.Items
Public Sub Application_Startup()
Set g_CalendarItems = Outlook.Session.GetDefaultFolder(olFolderCalendar).Items
End Sub
Private Sub g_CalendarItems_ItemAdd(ByVal Item As Object)
CheckReminder Item
End Sub
Private Sub g_CalendarItems_ItemChange(ByVal Item As Object)
CheckReminder Item
End Sub
Sub CheckReminder(ByVal Item As Object)
On Error GoTo ProcError
Dim strProcName As String
strProcName = "CheckReminder"
reminderMaxHour = 20
reminderMinHour = 9
Dim aAptItem As Outlook.AppointmentItem
Set aAptItem = Item
If aAptItem.ReminderSet Then
Dim reminderDate As Date
reminderDate = aAptItem.Start - aAptItem.ReminderMinutesBeforeStart / (24 * 60)
reminderHour = (reminderDate - Int(reminderDate)) * 24
tolerance = 0.01 ' avoid floating point small diffs (little bit less than a min)
If reminderHour < reminderMinHour - tolerance Or reminderHour > reminderMaxHour + tolerance Then
' best guess, first try to advance to next minHour
reminderDateSuggestion = reminderDate + (reminderMinHour - reminderHour) / 24
' verify if first guess is valid
If reminderHour < reminderMinHour - tolerance And reminderDateSuggestion <= aAptItem.Start Then
' OK, first guess is valid, keep it
ElseIf reminderHour > reminderMaxHour Then
' go back to max hour (same day)
reminderDateSuggestion = reminderDate - (reminderHour - reminderMaxHour) / 24
Else
' go back to max hour (previous day)
reminderDateSuggestion = reminderDate - (reminderHour + 24 - reminderMaxHour) / 24
End If
rep = MsgBox("The Reminder time is out of specified working period. Would you like to change the Reminder time?" , vbQuestion + vbYesNoCancel)
If rep = vbCancel Then
aAptItem.Display
ElseIf rep = vbYes Then
aAptItem.ReminderMinutesBeforeStart = (aAptItem.Start - reminderDateSuggestion) * 24 * 60
aAptItem.Save
End If
End If
End If
ProcExit:
Exit Sub
ProcError:
MsgBox "Unanticipated error " & Err.Number & " " & Err.Description & vbCrLf & "In procedure: " & strProcName
End Sub

 

Note: You can specify your working period with changing the following parameters in the VBA code above:
reminderMaxHour = 20
reminderMinHour = 9

Step 3: Save this VBA, and restart your Microsoft Outlook.

From now on, when creating an appointment with reminder time out of you specifying working period, it will pop up a dialog box to remind you after you click the Save & Close button.

If the reminder time is earlier than the specified reminderMinHour, click the Yes in the dialog box, it will change the reminder time and make the reminder sound at the specified reminderMinHour.

If the reminder time is later than the specified reminderMaxHour, click the Yes in the dialog box, it will change the reminder time and remind you at the specified reminderMaxHour.

Note: This VBA code works well with Outlook 2013, but does not work with Outlook 2010 and 2007.

 

Recommended Productivity Tools

shot kutools outlook kutools tab 1180x121
shot kutools outlook kutools plus tab 1180x121

Kutools for Outlook - More than 100 Advanced Functions for Outlook, Improve 70% Efficiency For you

  • Complicated and repeated operations can be done a one-time processing in seconds.
  • Forward multiple emails individually with one-click, and auto forward by rules.
  • Auto CC/BCC every sending email and easy for customizing rules, and auto reply without requiring exchange server.
  • Powerful junk emails filter, remove duplicate emails, reply with attachment, bunch of one-click operations, and so on...
  • 60-day unlimited free trial. 60-day money back guarantee. 2 years free upgrade and support. Buy once, use forever.
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.

Be the first to comment.