Automatically Refresh A SharePoint 2010 Calendar View

For some reason (at least to my knowledge) SharePoint 2010 does not provide a function to automatically refresh a SharePoint calendar view’s items at a given interval. The lack of this feature means a full page refresh is required any time a user wishes to check for any updates. While this might be suitable for infrequently updated calendars, for calendars that get frequently updated this is not desirable.

Fortunately, SharePoint does include a JavaScript library that provides methods for updating calendar views asynchronously. The particular library of interest is:


This repository contains a pointer to all of the calendar instances on the current page. If there is only one instance on the page, or you’re only interested in the first instance, there is a helper method firstInstance() to retrieve that calendar. Otherwise, you can find the collection of calendars as properties on the $o_0 property. You can turn this into a list using the following code:

var calendars = [];
var d = SP.UI.ApplicationPages.CalendarInstanceRepository.$o_0;

for (var k in d) {

Using The Calendar Repositories

Now that we have access to the calendar(s) we need to use them. One way of doing this is to create a hidden content editor web part that uses the following script to call refreshItems() every 10 seconds. First, create a new file RefreshCalendar.html and publish it somewhere on your SharePoint site.

<script type="text/javascript">
  setInterval(function() {
    try {
      var calendar = SP.UI.ApplicationPages.CalendarInstanceRepository.firstInstance(); // Get the first calendar instance on the page
      if (calendar) {
        calendar.refreshItems(); // async refresh of calendar items
    catch (e) {
      // ignore
  }, 10000); // Every 10 seconds

Next, add a content editor web part to the same page as the calendar view you wish to update automatically; setting the content link to the location of the RefreshCalendar.html page, and setting the Chrome Type to none to remove any headers, borders, e.t.c. (i.e. make the content editor web part invisible to the user).

Automatically Refresh a Sharepoint Calendar View Content Editor

Now, when a user goes to the calendar view, the items are automatically updated every 10 seconds. Because the call is asynchronous the user will not be impacted when an update occurs, even if they are adding, or editing, a calendar item.

Getting a Hierarchy of Outlook Folders With Their Entry ID

Simple console application to output a hierarchy of Outlook folders, with their Entry ID, using NetOffice.

using System;

namespace OutlookFolderIdGrabber
    public class Program
        public static void Main(string[] args)
            using (var application = new NetOffice.OutlookApi.Application())

        private static void DisplayFolder(NetOffice.OutlookApi.MAPIFolder folder, int level = 0)
            Console.WriteLine($"{new string(' ', level)}{folder.Name} : {folder.EntryID}");

            foreach (NetOffice.OutlookApi.MAPIFolder childFolder in folder.Folders)
                DisplayFolder(childFolder, level + 1);
<?xml version="1.0" encoding="utf-8"?>
  <package id="NetOffice.Core" version="" targetFramework="net461" />
  <package id="NetOffice.Outlook" version="" targetFramework="net461" />