2

I'm trying to export a table in Excel to create all day event in Outlook with given subject, start date, end date. Here's what I have:

With olAppt
    .AllDayEvent = True
    .Start = "7/29/2015"
    .End = "7/29/2015"
    .Subject = "All Day Event"
    .Save
End With

What I get is an event that reads "12:00am All Day Event" and it is placed as a 12:00am event instead of an all day event on the UI of the calendar (the event should not have the 12:00am time attached in front of the subject name but for some reason it is). If I click into the event detail it does have the all day event checkbox checked, and start end time being both 12:00 AM.

I don't want to have to scroll up to see a 12:00am event in the UI but rather a event at the top for where all day event supposed to be placed.

Anyone encountered this issue before? Thank you!

1 Answer 1

5

From https://msdn.microsoft.com/en-us/library/office/ff184629.aspx:

To make the appointment an all-day event, you must set the Start property to 12:00 A.M. (midnight) on the day you want the event to begin, and set End property to 12:00 A.M. on the day after you want the event to end. If you set the Start or End time to a date and time value other than 12:00 A.M., the appointment will become a multiday appointment instead of an all-day event. For example, if your event duration is only one day, set the Start property to 12:00 A.M. on the day you want the event to begin, and set the End property to 12:00 A.M. on the following day. You should always set the End property to 12:00 A.M. on a date that is more than one day after the start date.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.