I would like to be able to accept meeting tentative and not sending the response in one click.
for now I do it manually for each appointment by 2 clicks, 1. accept tentative -> 2. send\don't send response.
I have a script that accept meetings and send response.
I need help with the syntax to accept the meeting tentative.
thanks,
Amit
Function GetCurrentItem() As Object
Dim objApp As Outlook.Application
Set objApp = Application
On Error Resume Next
Select Case TypeName(objApp.ActiveWindow)
Case "Explorer"
Set GetCurrentItem = objApp.ActiveExplorer.Selection.Item(1)
Case "Inspector"
Set GetCurrentItem = objApp.ActiveInspector.CurrentItem
End Select
Set objApp = Nothing
End Function
Sub AcceptAppointmentAndSend()
Dim oAppt As MeetingItem
Dim cAppt As AppointmentItem
Dim oRequest As MeetingItem
Dim oResponse
Set cAppt = GetCurrentItem.GetAssociatedAppointment(True)
Set oRequest = GetCurrentItem()
'option to forward to someone
'Set oAppt = oRequest.Forward
'oAppt.Recipients.Add "alias@domain.com"
'oAppt.Send
'http://www.slipstick.com/developer/accept-or-decline-a-meeting-request-using-vba/
Set oResponse = cAppt.Respond(olMeetingAccepted, True)
oResponse.Send
oRequest.Delete
Set cAppt = Nothing
Set oAppt = Nothing
Set oRequest = Nothing
End Sub
for now I do it manually for each appointment by 2 clicks, 1. accept tentative -> 2. send\don't send response.
I have a script that accept meetings and send response.
I need help with the syntax to accept the meeting tentative.
thanks,
Amit
Function GetCurrentItem() As Object
Dim objApp As Outlook.Application
Set objApp = Application
On Error Resume Next
Select Case TypeName(objApp.ActiveWindow)
Case "Explorer"
Set GetCurrentItem = objApp.ActiveExplorer.Selection.Item(1)
Case "Inspector"
Set GetCurrentItem = objApp.ActiveInspector.CurrentItem
End Select
Set objApp = Nothing
End Function
Sub AcceptAppointmentAndSend()
Dim oAppt As MeetingItem
Dim cAppt As AppointmentItem
Dim oRequest As MeetingItem
Dim oResponse
Set cAppt = GetCurrentItem.GetAssociatedAppointment(True)
Set oRequest = GetCurrentItem()
'option to forward to someone
'Set oAppt = oRequest.Forward
'oAppt.Recipients.Add "alias@domain.com"
'oAppt.Send
'http://www.slipstick.com/developer/accept-or-decline-a-meeting-request-using-vba/
Set oResponse = cAppt.Respond(olMeetingAccepted, True)
oResponse.Send
oRequest.Delete
Set cAppt = Nothing
Set oAppt = Nothing
Set oRequest = Nothing
End Sub