Creating Outlook AllDayEvent - Trouble

W

Wendi Taranto

When I try to create an Appointment in Outlook as an 'AllDayEvent' I
actually get an appointment from 12AM to 12AM and 'AllDayEvent' is not
checked. Here is my code:

strSubject = "Test"
strDate = "9/1/2004"
objCalendarItem.Subject = strSubject
objCalendarItem.Start = strDate
objCalendarItem.End = strDate
objCalendarItem.AllDayEvent = True
objCalendarItem.Save

How can I create an all day event with the start and end times only having a
value of the date of the appointment (minus the formatted time)?????

HELP!

Thanks in advance!
 
K

Ken Slovak - [MVP - Outlook]

Try this:

strDate = "9/1/2004"
objCalendarItem.Subject = strSubject
objCalendarItem.Start = strDate
strDate = "9/2/2004"
objCalendarItem.End = strDate

You need to change the code so start <> end.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top