Access to Outlook .AllDayEvent

LB79

Registered User.
Local time
Today, 22:06
Joined
Oct 26, 2007
Messages
505
Hi All,

Im having a slight problem with automating calendar entries and hoped someone can help?
Using the below code, I can create the calendar entry – Great! But! The .AllDayEvent isn't being picked up.
I have tried using the date without time (as suggested elsewhere), but still my entries are not all day.

Dte is a date variable and set to “14/10/2011”

Any ideas?

Thanks

Code:
Public Function CalandarEntry()
Set OutlookApt = Outlook.CreateItem(olAppointmentItem)
With OutlookApt
.Subject = ""
.Start = Dte
.End = Dte
.ReminderSet = False
.AllDayEvent = True
.Categories = "Work"
End With
OutlookApt.Save
Set OutlookApt = Nothing
Set OutlookApp = Nothing
End Function
[/CODE]
 
I managed to get around this issue by using the DateAdd function so the start and end times were not the same.

.Start = Dte
.End = DateAdd("h", 1, Dte)

Now it works for me
 

Users who are viewing this thread

Back
Top Bottom