我有一个创建 Outlook 约会的 Excel 宏。除了需要将时区设置为“东部”之外,我可以让一切正常工作。我的一些同事住在其他时区,我想确保为他们设置了正确的时间。这是我目前拥有的代码。如何将时区设置为东部(美国和加拿大)?
Set objOL = CreateObject("Outlook.Application")
Set objItem = objOL.CreateItem(1)
With objItem
.StartTimeZone = "Eastern"
.Start = Range("B4").Text & " " & Range("C4").Text
.End = Range("B4").Text & " " & Range("D4").Text
.Body = "Centra Link: " & Range("K4") & vbCrLf & vbCrLf & " Phone: " & Range("I4") & vbCrLf & vbCrLf & "Lead facilitator: " & Range("E4") & vbCrLf & "Co-facilitator: " & Range("F4") & vbCrLf & vbCrLf & Range("MISC_HEADER") & ": " & Range("H4")
.Location = Range("I4") & ", Leader Code: " & Range("J4")
.alldayevent = False
.Subject = Range("A4")
.ReminderMinutesBeforeStart = 30
.ReminderSet = True
.Save
End With
Set objItem = Nothing
Set objOL = Nothing
MsgBox "An appointment has been created for " & Range("A4") & " on " & Range("B4"), vbOKOnly, "Calendar Appointment"