I have the following function that sets a calendar entry in MS. Outlook from
one of my forms. This works fine but it always sets the appointment to "Busy"
time instead of "Free"
When someone uses this I want it to set the appointment but have it still
show up in the calendar as free time?
Any ideas
Here is my code:
unction ExportToCalendar()
Dim olkApp As New Outlook.Application
Dim olkCalendar As Outlook.MAPIFolder
Dim olkNameSpace As Outlook.NameSpace
Set olkNameSpace = olkApp.GetNamespace("MAPI")
Set olkCalendar = olkNameSpace.GetDefaultFolder(olFolderCalendar)
With olkCalendar.Items.Add(olAppointmentItem)
.AllDayEvent = True
.Start = #9/21/2005 8:00:00 AM#
.End = #9/21/2005 9:00:00 AM#
.Subject = "This is a test subject"
.Save
End With
End Function
David C. Holley - 20 Sep 2005 23:33 GMT
Set the .BusyStatus property
olBusy
olFree
olOutOfOffice
olTentative
> I have the following function that sets a calendar entry in MS. Outlook from
> one of my forms. This works fine but it always sets the appointment to "Busy"
[quoted text clipped - 25 lines]
>
> End Function
David Lloyd - 20 Sep 2005 23:34 GMT
James:
I believe the property you are looking for is the BusyStatus property. For
example:
With olkCalendar.Items.Add(olAppointmentItem)
.AllDayEvent = True
.Start = #9/21/2005 8:00:00 AM#
.End = #9/21/2005 9:00:00 AM#
.Subject = "This is a test subject"
.BusyStatus = olFree
.Save
End With

Signature
David Lloyd
MCSD .NET
http://LemingtonConsulting.com
This response is supplied "as is" without any representations or warranties.
I have the following function that sets a calendar entry in MS. Outlook from
one of my forms. This works fine but it always sets the appointment to
"Busy"
time instead of "Free"
When someone uses this I want it to set the appointment but have it still
show up in the calendar as free time?
Any ideas
Here is my code:
unction ExportToCalendar()
Dim olkApp As New Outlook.Application
Dim olkCalendar As Outlook.MAPIFolder
Dim olkNameSpace As Outlook.NameSpace
Set olkNameSpace = olkApp.GetNamespace("MAPI")
Set olkCalendar = olkNameSpace.GetDefaultFolder(olFolderCalendar)
With olkCalendar.Items.Add(olAppointmentItem)
.AllDayEvent = True
.Start = #9/21/2005 8:00:00 AM#
.End = #9/21/2005 9:00:00 AM#
.Subject = "This is a test subject"
.Save
End With
End Function