VBA:创建 Outlook 全天活动约会
VBA: Create Outlook All Day Event Appointment
我正在尝试在 Excel 中导出 table 以在 Outlook 中创建具有给定主题、开始日期和结束日期的全天活动。这是我拥有的:
With olAppt
.AllDayEvent = True
.Start = "7/29/2015"
.End = "7/29/2015"
.Subject = "All Day Event"
.Save
End With
我得到的是一个显示为“12:00am 全天事件”的事件,它被放置为 12:00am 事件而不是 UI 上的全天事件日历(事件不应在主题名称前附加 12:00am 时间,但出于某种原因它是)。如果我单击事件详细信息,它确实选中了全天事件复选框,并且开始和结束时间都是 12:00 AM。
我不想向上滚动才能看到 UI 中的 12:00am 活动,而是顶部的活动,用于放置全天活动的位置。
有人遇到过这个问题吗?谢谢!
来自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.
我正在尝试在 Excel 中导出 table 以在 Outlook 中创建具有给定主题、开始日期和结束日期的全天活动。这是我拥有的:
With olAppt
.AllDayEvent = True
.Start = "7/29/2015"
.End = "7/29/2015"
.Subject = "All Day Event"
.Save
End With
我得到的是一个显示为“12:00am 全天事件”的事件,它被放置为 12:00am 事件而不是 UI 上的全天事件日历(事件不应在主题名称前附加 12:00am 时间,但出于某种原因它是)。如果我单击事件详细信息,它确实选中了全天事件复选框,并且开始和结束时间都是 12:00 AM。
我不想向上滚动才能看到 UI 中的 12:00am 活动,而是顶部的活动,用于放置全天活动的位置。
有人遇到过这个问题吗?谢谢!
来自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.