Javascript to trigger Connect to Outlook feature in SharePoint 2013

For usability, you may need to include buttons for users to download SharePoint calendar instance to MS Outlook in your custom application page. Adding this custom button, they do not need to access to the calendar page and hit on the SharePoint Ribbon button.

To achieve this function, firstly, you need to know how to mock the original Connect to Outlook button javascript.

In SharePoint init.js file, there exists a javascript function as shown



function ExportHailStorm(type, weburl, guid, webname, listname, viewurl, passport, listrooturl, folderurl, folderid) {</span>



The following shows a sample on how to call this javascript via HTML button.


<input onclick="javascript:ExportHailStorm(
‘Team Site1’,
‘/team/Lists/Calendar’);return false;" type="button" value="Download Calendar"/>


With this, you can setup multiple download buttons for different calendar instances into your custom place.

Connect to Outlook Javascript Button

Leave a Reply

Your email address will not be published. Required fields are marked *