-1
해당 시간에 모임이 있는지 여부에 따라 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("[email protected]")
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
코드를 디버깅 했습니까? –
@ Nathan_Sav 나는 내가 어떻게 ...이 질문을 발견했는지 모른다는 것을 두려워한다. (http://stackoverflow.com/questions/5029141/debugging-an-outlook-2007-script-fired-by-a -rule)하지만 MeetingItem 매개 변수를 삽입하는 방법은 설명하지 않으며 개체를 만들 수없는 것으로 보입니다 ([this ref] (https://msdn.microsoft.com/en-us/library/office)를 참조하십시오. /ff868714.aspx)) – RhysO
중단 점을 사용하고 Google에서 빠른 모양을 유지합니다. 나는 비슷한 것을 triesd, 그래서 이것에 대한 답변을 확인해보십시오 http://stackoverflow.com/questions/32974269/get-meeting-time-when-accepting-meeting –