gpt4 book ai didi

vba - Outlook 约会 - 如何更改开始时间下拉列表中的项目

转载 作者:行者123 更新时间:2023-12-01 10:37:06 32 4
gpt4 key购买 nike

我需要将开始/结束时间下拉列表中的项目更改为相隔 5 分钟。似乎没有简单的方法来设置它,所以我正在尝试 VBA。

我可以让检查员在打开预约表格时进行检查:

If Inspector.CurrentItem.Class = olAppointment Then

...但我不知道如何引用或更改开始/结束时间下拉控件以获得我想要的时间列表。

如果有人知道允许用户以 5 分钟为间隔选择时间的替代方法,那也太好了!

最佳答案

检查 Appointment.Start属性(property)。使用以下函数获取当前对象

Function GetCurrentItem() As Object
Dim objApp As Outlook.Application
Set objApp = Application
On Error Resume Next
Select Case TypeName(objApp.ActiveWindow)
Case "Explorer"
Set GetCurrentItem = objApp.ActiveExplorer.Selection.Item(1)
Case "Inspector"
Set GetCurrentItem = objApp.ActiveInspector.CurrentItem
End Select
GetCurrentItem.UnRead = False
Set objApp = Nothing
End Function

关于vba - Outlook 约会 - 如何更改开始时间下拉列表中的项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33382856/

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