gpt4 book ai didi

excel - VBA:创建 Outlook 全天事件约会

转载 作者:行者123 更新时间:2023-12-04 19:56:21 25 4
gpt4 key购买 nike

我正在尝试导出 Excel 中的表格,以便在 Outlook 中创建具有给定主题、开始日期、结束日期的全天事件。这是我所拥有的:

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

我得到的是一个显示为“12:00am 全天事件”的事件,并且它被放置为 12:00am 事件,而不是日历用户界面上的全天事件(该事件不应具有 12:00am 事件)主题名称前面附有上午 00 点的时间,但由于某种原因,它是这样的)。如果我点击进入事件详细信息,它会选中全天事件复选框,并且开始结束时间均为上午 12:00。

我不想在 UI 中向上滚动才能看到凌晨 12:00 的事件,而是希望在顶部看到一个用于放置全天事件的事件。

以前有人遇到过这个问题吗?谢谢!

最佳答案

来自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 - VBA:创建 Outlook 全天事件约会,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31704979/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com