首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >自动接受/自动暂定接受

自动接受/自动暂定接受
EN

Stack Overflow用户
提问于 2016-06-23 09:18:47
回答 1查看 787关注 0票数 0

我希望接受或暂时接受Outlook中的会议请求,这取决于当时是否有会议。我已经设置了规则;据我所知,它运行VBA,但代码不起作用。我找不到问题所在。

代码语言:javascript
运行
复制
Sub AcceptDecline(oRequest As MeetingItem)

If oRequest.MessageClass <> "IPM.Schedule.Meeting.Request" Then
    Exit Sub 'if this messageclass isn't a meeting request
End If

Dim oAppt As AppointmentItem
Set oAppt = oRequest.GetAssociatedAppointment(True)

Dim myAcct As Outlook.Recipient
Dim myFB As String

Set myAcct = Session.CreateRecipient("roconnor@pattonair.com")

myFB = myAcct.FreeBusy(oAppt.Start, 5, False) 'gets the free or busy status of my calendar

Dim oResponse
Dim i As Long
Dim test As String

i = (TimeValue(oAppt.Start) * 288)
test = Mid(myFB, i - 2, (oAppt.Duration / 5) + 2)

If InStr(1, test, "1") Then
    Set oResponse = oAppt.Respond(olMeetingTentative, True)
    oResponse.Display
    oResponse.Send

Else
    Set oResponse = oAppt.Respond(olMeetingAccepted, True)
    oResponse.Display
    oResponse.Send
End If
End Sub
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-06-27 21:21:50

如果会议请求自动创建暂时接受的会议,则空闲忙碌表示您正忙着。答复将永远是暂时接受。

文件->选项->邮件->跟踪->禁用:自动处理会议请求和对会议请求和轮询的响应

https://www.msoutlook.info/question/do-not-automatically-accept-meeting-as-tentative

如果这不是问题所在,那么打开请求,该请求不会自动标记为暂定,并逐步完成以下操作:

代码语言:javascript
运行
复制
Private Sub AcceptDecline_test()
    AcceptDecline ActiveInspector.currentItem
End Sub
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/37987307

复制
相关文章

相似问题

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