我希望接受或暂时接受Outlook中的会议请求,这取决于当时是否有会议。我已经设置了规则;据我所知,它运行VBA,但代码不起作用。我找不到问题所在。
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
发布于 2017-06-27 21:21:50
如果会议请求自动创建暂时接受的会议,则空闲忙碌表示您正忙着。答复将永远是暂时接受。
文件->选项->邮件->跟踪->禁用:自动处理会议请求和对会议请求和轮询的响应
https://www.msoutlook.info/question/do-not-automatically-accept-meeting-as-tentative
如果这不是问题所在,那么打开请求,该请求不会自动标记为暂定,并逐步完成以下操作:
Private Sub AcceptDecline_test()
AcceptDecline ActiveInspector.currentItem
End Sub
https://stackoverflow.com/questions/37987307
复制相似问题