【发布时间】:2021-08-18 06:17:47
【问题描述】:
我已经编写了一个在 Outlook 2016 中创建约会的代码,但我被困在这里更改时区。任何人都可以在这里帮助提前谢谢。
Sub Outlook_Appointment()
Dim o As Outlook.Application
Set o = New Outlook.Application
Dim ONS As Outlook.Namespace
Set ONS = o.GetNamespace("MAPI")
Dim CAL_FOL As Outlook.Folder
Set CAL_FOL = ONS.GetDefaultFolder(olFolderCalendar)
Dim myapt As Outlook.AppointmentItem
Set myapt = CAL_FOL.Items.Add(olAppointmentItem)
With myapt
.Display
.Start = Date + TimeValue("15:30:00")
.End = Date + TimeValue("16:30:00")
.Location = "Seattle"
.Subject = "Discussion"
.Body = "This is a test mail to block the calendar"
.ReminderMinutesBeforeStart = TimeValue("00:15:00")
.To = "abc@gmail.com"
.Save
End With
End Sub
谢谢
【问题讨论】:
-
尝试使用AppointmentItem.StartTimeZone和AppointmentItem.EndTimeZone
-
您好,我已经按照您的说法进行了尝试。但我不确定如何发送价值?你能给我举个例子吗?在我的代码中: ``` With myapt .Display .StartTimeZone = 我应该在这里为英国传递什么 .EndTimeZone = 我应该在这里为英国传递什么以 ``