首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在outlook中使用时区设置约会

如何在outlook中使用时区设置约会
EN

Stack Overflow用户
提问于 2021-08-17 17:47:05
回答 1查看 57关注 0票数 0

我已经编写了在outlook 2016中创建约会的代码,但我被困在这里更改时区。有人能帮上忙吗?先说声谢谢。

代码语言:javascript
复制
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

谢谢

EN

回答 1

Stack Overflow用户

发布于 2021-08-17 22:17:47

AppointmentItem.Start属性值始终以本地时区表示,请查看Application.TimeZones.CurrentTimeZone,它返回表示当前TimeZone系统本地时区的Windows值。

时区信息用于在保存约会时将约会映射到正确的UTC时间,并在日历中显示项目时映射到正确的本地时间。

AppointmentItem.StartTimeZone属性返回或设置与约会开始时间的时区相对应的TimeZone值。

AppointmentItem.EndInEndTimeZone属性返回或设置一个日期值,该值表示以AppointmentItem.EndTimeZone表示的约会的结束日期和时间。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/68821906

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档