I need to create an outlook add-in where appointments will trigger some functionality. For example when an appointment starts I will make a HTTP post request to a server from my outlook addin.
Anyways these appointments need to be synchronized. That is if one user creates an appointment I will like the other outlooks to also create the same appointment. To do so I thought about this:
private void ThisAddIn_Startup(object sender, System.EventArgs e)
{
Microsoft.Office.Interop.Outlook.Application outlookApp = Globals.ThisAddIn.Application;
// get primary calendar
MAPIFolder temp = outlookApp.Session.GetDefaultFolder(OlDefaultFolders.olFolderCalendar);
// raise an event when a new appointment is created
temp.Items.ItemAdd += Items_ItemAdd;
}
void Items_ItemAdd(object Item)
{
// serialize this new appointment and send it to the other outlooks
}
With this approach I am basically subscribing to events when an appointment is being deleted, modified or created and propagating those changes on the other outlooks I don't think this will be the best way of sharing a calendar and I feel like I am reinventing the wheel. The reason why I want to take this approach is because I do not know how to share a calendar from within my outlook addin.