I want show the Outlook cancellation form when an appointment is deleted via code in Delphi (program code, otherwise). I am able to delete an item which will delete the item from Outlook (please note the item does have recipient also). But I would like to show the cancellation form that Outlook uses when the user clicks on the Cancel Meeting button of the appointment item.
Is this possible?
Secondly, if this is not possible, then when the appointment is deleted via code (that is. appointment.Delete) I would like to send out the same cancel meeting email that outlook generates to each recipient. At the moment, when the appointment is deleted, even if there are recipient no email is sent.
Please help.
Set the MeetingStatus property to olMeetingCanceled and call Send. You can then delete the appointment.
Related
I am writing a COM based Addin for outlook to get the appointment or meeting list.
I have written a code to get the list of appointments/meetings.
Now I am trying to find out the event when new appointment or meeting is created.
I have tried almost all events of AppointmentItem Object, but didn't get the proper event.
Is there any way to programmatically get the event when user create a appointment or meeting in Outlook calendar?
You can try to use the ItemAdd event of the Items class. This event is fired when one or more items are added to the specified collection. This event does not run when a large number of items are added to the folder at once.
Note, there is no event until the item is saved and the EntryID property is set.
I'm developing an Outlook add-in that allows the user to save an email to the filesystem just after it's been sent.
To achieve this, I intercept the Application.ItemSend event, and inside my handler I call MailItem.SaveAs(...). It works, basically.
The problem I'm facing is that, when I open the file saved, the email is in draft state. I mean, the recipients, subject and message body can be modified, and the email can be resent. I want the email to be in "sent" state, i.e. not modifiable.
It looks like Outlook API does not provide any event dispatched after the email is sent. Only before, and this is my pain.
Do you have any idea to perform this?
Thanks a lot for your help!
Nico
the earliest you can save the message in the sent state and with the sender properties populated is when Items.ItemAdd event fires on the Sent Items folder.
I'm trying to cancel a meeting I created by using an EWS XML CreateItem request (against a 2013 server):
<ns2:CreateItem MessageDisposition="SendAndSaveCopy"><ns2:Items>
<ns1:CancelCalendarItem>
<ns1:ReferenceItemId Id="AAMkA...." ChangeKey="DwAAA..."/>
</ns1:CancelCalendarItem>
</ns2:Items></ns2:CreateItem>
So far so good, however Outlook denies me access with the ResponseCode "ErrorCalendarIsNotOrganizer" / "User must be an organizer for CancelCalendarItem action".
A look in the event detail by using GetItem with BaseShape=ALL_PROPERTIES reveals that the account I use is set as Organizer, however at the same time:
the IsOrganizer field is set to false
in EffectiveRights the fields Read, Modify and Delete are true.
I can delete the appointment lateron using a DeleteItem request and it works, however it only removes the appointment from the room's calendar but not from the mailboxes of the attendees.
What causes this? There is no impersonation in use, only the service account I use has delegation access to every room mailbox (to be able to see all appointments).
I can delete the appointment lateron using a DeleteItem request and it works, however it only removes the appointment from the room's calendar but not from the mailboxes of the attendees.
It sounds like your accessing the appointment in the Room Mailboxes calendar ? this is why even if your using the account that is the organizer of that appointment the isOrganizer will return as false because this property is only true on the copy of the Appointment in the Organizers calendar. To correctly cancel the meeting you need to do that on the calendar of the Organizer (not the rooms or any attendee instance of the meeting). This will still only delete the appointment in the organizer calendar and send cancellation messages to the attendees.
An important point is that all instances of the meeting stored in the Attendees and Meeting Room calendars are separate Exchange Store items with no direct link. So deleting the organizer instance (or any attendee instance) has no affect on the other attendees instances these must be processed separately by the attendees themselves based on the cancellation message that is received.
Outlook 2010 and 2010+ versions seem to remove meeting request emails from your inbox once you accept or decline the invite.
How do I prevent these from being removed and keep them in my inbox?
Usually the meeting invite also contains useful information or things that need to be followed up later.
In Outlook, this is found under the File tab. Click Options, then Mail, and scroll down to the Send messages section. Uncheck the box next to Delete meeting requests and notifications from Inbox after responding
The provided "ounce of prevention" instructions are spot on! However, when faced with the immediate dilemma of needing the email... one goes to the Deleted Items folder to find the email, BUT (because the invitation email may be prevented from opening by Outlook) one must click Reply to then be able to once again read (and hyperlink-click) the original email entries.
I just did this, but with the Outlook web (Office 365) it's a little different now. To stop calendar invites being deleted do the following:
Go to the settings wheel > View all Outlook settings > Calendar > Events and invitations > uncheck the box 'delete invitations and responses that have been updated'
I am trying to write an application that can manage meetings, I want to be able to send an vcal/ical event via email and have the recipient be the organizer. I have populated the organizer field with the recipients email address which does not have the required result. (in outlook 2010 at least) It appears in their calendar but it does not acknowledge them as the organizer so when trying to move the event a message is displayed notifying them that they are not the organizer.
You could try the solution in the answer found here:
Change organizer of outlook AppointmentItem via VSTO
You could also create appointments directly into the intended organizer's calendar using the GetSharedDefaultFolder method, as long as you have delegate access to their mailbox.
Otherwise I do not believe there is any way to remotely set the organizer of a meeting.