D
David
Hello World,
I am getting desparate. I can not imagine i hit a problem that no one can solve after so many versions of Outlook. I posted couple of requests on this newsgroup but no real reply to the issue.
I simplified my problem to the below to make sure it is clear:
There is DAILY recurring meetings with 4 instances: Sunday to Wednesday
The user selects ONLY Monday and hit my macro.
i want to be able to know that the user selected the Monday meeting and to reject the meeting.
This is what Demitry told me on this thread and i dont think he answered the question:
"You will need to use the various recurrence properties (RecurrencePattern.RecurrenceType, RecurrencePattern.Exception, etc) to
figure out the dates of the occurences. Unfortunately there is no way to access "
I am sure there is API to detect it as if you do it manually it work and the dialog box asks you to delecet between all the sries of meetings or this one.
Thanks
David
-------------------------------------------- CODE -----------------------------------------
Public Sub RejectOnlyTheseInvites()
Dim myOlApp As Outlook.Application
Dim Appointment As Outlook.AppointmentItem
Dim MyPattern As Outlook.RecurrencePattern
Dim ThisAppointmentInstance As Outlook.AppointmentItem
Dim MyException As Outlook.Exceptions
Dim I As Integer
Set myOlApp = CreateObject("Outlook.Application")
Set Sel = myOlApp.ActiveExplorer.Selection
For I = 1 To Sel.Count
If Sel.Item(I).Class = olAppointment Then
Set Appointment = Sel.Item(I)
If Appointment.RecurrenceState = olApptNotRecurring Then
Appointment.Respond olMeetingDeclined, False, False
Else
Set MyPattern = Appointment.GetRecurrencePattern
[?????? Get the date of the selected instance]
[Exception is not marked with this selected date. can not use it]
Set ThisAppointmentInstance = MyPattern.GetOccurrence(??? a date ???? )
ThisAppointmentInstance.Respond olMeetingDeclined, False, False
End If
End If
Next
End Sub
I am getting desparate. I can not imagine i hit a problem that no one can solve after so many versions of Outlook. I posted couple of requests on this newsgroup but no real reply to the issue.
I simplified my problem to the below to make sure it is clear:
There is DAILY recurring meetings with 4 instances: Sunday to Wednesday
The user selects ONLY Monday and hit my macro.
i want to be able to know that the user selected the Monday meeting and to reject the meeting.
This is what Demitry told me on this thread and i dont think he answered the question:
"You will need to use the various recurrence properties (RecurrencePattern.RecurrenceType, RecurrencePattern.Exception, etc) to
figure out the dates of the occurences. Unfortunately there is no way to access "
I am sure there is API to detect it as if you do it manually it work and the dialog box asks you to delecet between all the sries of meetings or this one.
Thanks
David
-------------------------------------------- CODE -----------------------------------------
Public Sub RejectOnlyTheseInvites()
Dim myOlApp As Outlook.Application
Dim Appointment As Outlook.AppointmentItem
Dim MyPattern As Outlook.RecurrencePattern
Dim ThisAppointmentInstance As Outlook.AppointmentItem
Dim MyException As Outlook.Exceptions
Dim I As Integer
Set myOlApp = CreateObject("Outlook.Application")
Set Sel = myOlApp.ActiveExplorer.Selection
For I = 1 To Sel.Count
If Sel.Item(I).Class = olAppointment Then
Set Appointment = Sel.Item(I)
If Appointment.RecurrenceState = olApptNotRecurring Then
Appointment.Respond olMeetingDeclined, False, False
Else
Set MyPattern = Appointment.GetRecurrencePattern
[?????? Get the date of the selected instance]
[Exception is not marked with this selected date. can not use it]
Set ThisAppointmentInstance = MyPattern.GetOccurrence(??? a date ???? )
ThisAppointmentInstance.Respond olMeetingDeclined, False, False
End If
End If
Next
End Sub