Hi Meppy,
Currently, each of our Microsoft Outlook clients connect up to a Microsoft Exchange server where all emails and calendars are held. If I'm wanting to share my calendar with other Outlook users, I click on the Calendar button, and select the 'Share my Calendar' link which generates an email. I can then choose which recipients from the business address book to share the Calendar to. The same applies to other users who wish to share their Calendar to me. On the provided screen shot, I've been given access to two other people's Calendar which is shown on the left above the links panel.
How these folders are accessed from the API, I'm not entirely sure, but if it helps to narrow it down, I've got a small piece of code that was initially used some time ago before we opted for the Planner.NET method. (It's faster)
Here's the screen shot:
http://www.apexnow.co.uk/outlook.pngWith respect to the code, I've listed a small snippet of the initial function we used to establish a link to the Outlook API and retrieve folders based on the provided user name: (Visual Basic.NET)
Public Function SaveToOutlookCalendar(ByVal Name As String, ByVal StartTime As DateTime, ByVal EndTime As DateTime, ByVal Subject As String, ByVal Body As String, ByVal Location As String, ByVal Categories As String) As String
Dim Duration As TimeSpan = EndTime.Subtract(StartTime)
' Start Outlook.
' If it is already running, you'll use the same instance...
Dim OutlookRef As String = String.Empty
Dim olApp As Microsoft.Office.Interop.Outlook.Application
Dim olNs As Microsoft.Office.Interop.Outlook.NameSpace
Dim oRec As Microsoft.Office.Interop.Outlook.Recipient
Dim Calend As Microsoft.Office.Interop.Outlook.MAPIFolder
Dim olAppt As Microsoft.Office.Interop.Outlook.AppointmentItem = Nothing
'Dim objSafeItem As Redemption.SafeAppointmentItem
Try
'olApp = CreateObject("Outlook.Application") ' !!Obsolete
olApp = New Microsoft.Office.Interop.Outlook.Application
olNs = olApp.GetNamespace("MAPI")
oRec = olNs.CreateRecipient(Name)
Calend = olNs.GetSharedDefaultFolder(oRec, OlDefaultFolders.olFolderCalendar)
oRec.Resolve()
If oRec.Resolved Then
' Create a new appointment.
olAppt = Calend.Items.Add()
With olAppt
.Start = StartTime
.End = EndTime
.Duration = Convert.ToUInt32(Duration.TotalMinutes)
.Subject = Subject
.Body = Body
.Location = Location
.Categories = Categories
.ReminderMinutesBeforeStart = Nothing
.ReminderSet = False
.Save()
End With
End If
If Not olAppt Is Nothing Then
OutlookRef = Convert.ToString(olAppt.EntryID)
Else
OutlookRef = String.Empty
End If
Catch ex As System.Exception
MsgBox("SAM failed to ammend the Microsoft Outlook Schedule due to the following reason: " & ex.Message)
End Try
Calend = Nothing
olAppt = Nothing
oRec = Nothing
olApp = Nothing
olNs = Nothing
Return OutlookRef
End Function
Kind regards,