Can VBA intervene when updating Internet Calendars?

Discussion in 'Outlook VBA and Custom Forms' started by Kenneth Wilson, Jan 11, 2018.

  1. Kenneth Wilson

    Kenneth Wilson

    Is it possible for VBA to capture the event when Outlook starts to update subscribed Internet Calendars, and insert some logic into that process?


    I have several "Internet Calendars" (via url) subscribed in Outlook.
    Outlook throws lots of errors for various reasons, based on certain content in the ical format that it doesn't handle well.
    I would like to code something to intervene when Outlook is doing a scheduled update of those calendars, and programmatically "clean up" the incoming file before it's processed, removing known issues that Outlook chokes on.

    FYI, for example... when Google publishes a calendar to ical format, it includes a backslash as an escape character, in front of any comma or semicolon in certain text fields. But Outlook chokes on these backslashes and throws an error in the Send/Receive window. I'd love to be able to tell Outlook to ignore the backslashes.

    Also FYI:
    I found a great free service called, where one can filter out a lot of stuff. But, so far, the service does not have a "replace" function that would let me eliminate backslash characters (etc).
  2. Diane Poremsky

    Diane Poremsky

    Senior Member
    to the best of my knowledge, no, at least not without using redemption. @Michael Bauer would likely know more about it than i do.
  3. Kenneth Wilson

    Kenneth Wilson

    Thanks, Diane
  4. Michael Bauer

    Michael Bauer

    Senior Member
    Sorry, I`ve never used any internet calendars. If the calendar is listed anywhere under send/receive groups, then see the events of the SyncObject, which is accessible via Session.SyncObjects(x). If such a calendar is updated constantly, maybe the ItemChange event of the Folder.Items object is something you wanna look at.
  5. Kenneth Wilson

    Kenneth Wilson

    Thanks, Michael. I did some experimenting and set up to capture the SyncObject_SyncStart, _SyncEnd, _OnError, and _Progress events. I have each event set up to log its properties to a global email item that I created.

    By doing this, I've documented that the SyncStart and SyncEnd events fire and work as I expect.
    But the OnError and Progress events never fire.

    Any thoughts on why not?

    I would tentatively rule out any issues with creating or setting the SyncObject, since I'm only using one, and like I said, it does fire the SyncStart and SyncEnd events ok.

    Also FYI: I do see that Outlook is throwing some "errors" during calendar sync, because it lists a handful of them in the Send/Receive dialog. These "errors" are just related to individual calendar entries in the ical file, and Outlook says it's ignoring them. Now... I'm not sure whether those "errors" are the same thing that it's supposed to trap as events in SyncObject_OnError()... ??
  6. Michael Bauer

    Michael Bauer

    Senior Member
    No thoughts, sorry.

Share This Page