Google Calendar Sync Missing Meetings

Google Calendar Sync is a great utility to synchronize an Outlook calendar with a Google calendar. I’ve been using the tool to perform a one-way synchronization from Outlook 2010 to a Google calendar. However, Google Calendar Sync does not always reliably synchronize all meetings from my Outlook to Google. After some digging, I found that the missing meetings each had one or both of the following in common in Outlook:

  • The Message Class property of the meeting was not IPM.Appointment.
  • It was a recurring meeting where an underlying time zone property was set to (GMT-05:00) Eastern Time (US & Canada) or Eastern Standard Time.

In either case, Google Calendar Sync does not provide any indication that there was an issue synchronizing a meeting. This results in missed meetings if you are only relying on the Google calendar and you are not periodically reviewing that both calendars are synchronized. In the log files, the following error message for the time zone issue was included:

Unable to get by label (GMT-05:00) Eastern Time (US & Canada)
SEVERE: Recurrence has no start date

The following VBA script provides an automatic method for correcting these issues as meeting requests are received. Once the script is added to Outlook, it will notify you as issues are identified and correct the Message Class and time zone. This script would need to be modified if the time zone error is occurring in time zones other than Eastern Time. Preferably, it would be nice if the Google Calendar Sync tool was updated to display error notifications or to handle these errors, but this script provides a workaround in the meantime.

This script should be added to “ThisOutlookSession” in the Visual Basic editor for Outlook. Tested on Windows 7 and Outlook 2010.

Option Explicit
Public WithEvents mySync As Outlook.SyncObject

Public Sub Application_Startup()
  Set mySync = Application.Session.SyncObjects.Item(1)
End Sub

Private Sub mySync_SyncEnd()
End Sub

Private Sub correctOutlookCalendarItemsForGoogleCalendarSync()
  Dim calendarItemsFolder As Outlook.Folder
  Dim apptItm As Outlook.appointmentItem
  Dim timeZoneSchema As String
  Dim oldGmtTZ As String
  Dim oldEstTZ As String
  Dim newTZ As String
  Dim response As String
  Dim isUpdated As Boolean
  Set calendarItemsFolder = Application.GetNamespace("MAPI") _
  timeZoneSchema = "" _
                 & "{00062002-0000-0000-C000-000000000046}/8234001E"
  oldGmtTZ = "(GMT-05:00) Eastern Time (US & Canada)"
  oldEstTZ = "Eastern Standard Time"
  newTZ = "(UTC-05:00) Eastern Time (US & Canada)"
  response = ""
  isUpdated = False
  For Each apptItm In calendarItemsFolder.Items
    response = ""
    isUpdated = False
    If (apptItm.RecurrenceState = olApptMaster) Then
      If (apptItm.PropertyAccessor.GetProperty(timeZoneSchema) = oldGmtTZ) Then
        apptItm.PropertyAccessor.SetProperty timeZoneSchema, newTZ
        isUpdated = True
      End If
      If (apptItm.PropertyAccessor.GetProperty(timeZoneSchema) = oldEstTZ) Then
        apptItm.PropertyAccessor.SetProperty timeZoneSchema, newTZ
        isUpdated = True
      End If
    End If
    If (apptItm.MessageClass <> "IPM.Appointment") Then
      apptItm.MessageClass = "IPM.Appointment"
      isUpdated = True
    End If
    If (isUpdated) Then
      response = MsgBox("Appointment '" & apptItm.Subject _
               & "' must be updated." & vbCrLf & vbCrLf & "Continue?", vbYesNo)

      If response = vbYes Then
        MsgBox "Saving changes to appointment '" & apptItm.Subject & "'"
      End If
    End If
End Sub

7 thoughts on “Google Calendar Sync Missing Meetings”

  1. Absolutely brilliant. I’ve been struggling to find out why some events were not syncing for *days*. Thanks a million for publishing this.

  2. Thanks for posting this. Where are the allowed timezones documented for google sync? I need to fix appointments with a Arizona timezone. Here is what it is currently set to: GMT -0700 (Standard) / GMT -0700 (Daylight)

  3. Sorry, I don’t know if there is a list of valid time zones published for Google Calendar Sync. If you have appointments in the Arizona timezone that are properly syncing, then you could temporarily modify the code to use apptItm.PropertyAccessor.GetProperty(timeZoneSchema) to display the time zone string and use that as the replacement. I had to do this to figure out the “correct” eastern time zone string as well.

  4. Thank you so much for publishing this. The first result of a google search for this error pointed me here and your code worked perfectly. I wasn’t familiar with running visual basic code in Outlook so it took me a little time to find out how to use this in Outlook 2007. For those who don’t know:
    – Hit Alt-F11 to open up the Visual Basic window in Outlook
    – On the left side, expand Project1, Microsoft Office Outlook Objects
    – Double click on “ThisOutlookSession” and enter the code above in the resulting window.
    – Save and then hit F5 to run the code.

    This was successfully tested in Outlook 2007 running on Windows 7 64-bit.



Leave a Comment