Access Outlook Public Calendar Folders
Posted on 2001-07-24
I am trying to get calendar items from public folders in Exchange. I have gotten some code to work for the default calendar in Outlook, but could not figure out how to get the public folder items. I searched all over the internet and couldn't find the answer. Sample code would be helpful, but not required.
I previously asked this question, and "smurff" said:
The only thing I have is a VB code example of interfacing with the calender public folders in exchange.
You can add appointments to a user's personal calendar folder and to a public folder.
To add an appointment to a folder
Create an Appointment object.
Set the properties of the appointment. A StartTime is required.
Save the appointment to the designated folder by using the Appointment object's IDataSource Interface.
The following example shows how to create an appointment and then save it to a specified folder:
' Reference to Microsoft ActiveX Data Objects 2.5 Library
' Reference to Microsoft CDO for Exchange 2000 Library
Function CreateAppointment(StartTime As Date, _
EndTime As Date, _
Subject As String, _
Location As String, _
TextBody As String, _
iMbx As IMailbox) As Appointment
Dim iAppt As New Appointment
Dim Conn As New ADODB.Connection
Conn.Provider = "ExOLEDB.DataSource"
'Set the appointment properties
.StartTime = StartTime
.EndTime = EndTime
.Subject = Subject
.Location = Location
.TextBody = TextBody
'Save the appointment
.DataSource.SaveToContainer iMbx.Calendar, Conn
Set CreateAppointment = iAppt
sorry i dont have a delphi one. Maybe someone could convert for you?
If you can convert that to Delphi, I'll give you and Smurff points.