I have a plugin which syncs read-only shared calendars in Outlook with our collaboration system. I need to make sure the user cannot delete any appointments in these read-only calendars. It's possible to attach an event handler to any appointment in Outlook (this works) but it won't work for recurring events. Each occurrence in the recurrence pattern is a separate object in Outlook, and the app must attach an event handler to each of such objects. If the recurrence pattern is endless (which is quite popular for such appointments), the app should attach infinite number of event handlers.
Is it possible to attach an event handler to some of kind of a grouping object (if such entity exists) for all occurrences at once, or is there any other method of solving my task?
When an instance of a recurring appointment is deleted, the master appointment will be modified. You can intercept that change by subscribing to the AppointmentItem.Write event, whcih has the Cancel parameter.
Related
We'd like to use Microsoft Graph API to create calendar events in order to sync the calendar events of our own application with the ones in Outlook. However, in our application, we have time periods that are closed for altering. So, the events become read-only on our side. Now we need Outlook to behave accordingly. Is there a way to create a (or alter an existing event to a) read-only calendar event (prevent the user from changing the time frame or deleting an event)?
It is not sufficient for us to only listen to changes made in Outlook because it's forbidden on our side to delete an event that's already "closed" and without deleting it in our application, there would be an inconsistency in the data.
My app keeps track of users' calendar events via Microsoft Graph API. My database records each synced event's ChangeKey, which helps my app determine whether a event has changed and should be processed by business logic.
I also subscribe to the change notification API so that my app doesn't have to poll often.
What I found out lately is that whenever the user dismisses an event's "reminder" via Outlook (via the Outlook reminder popup), which is a very common thing to do as Outlook puts all calendar events on reminders automatically, the Graph API would send out change notification on that event.
That would have been fine – except that the event's ChangeKey actually changes, even though nothing material about the event has changed (date times/subject/body etc). Since my app uses the ChangeKey property to compare events, the business logic triggers unnecessarily.
Is this normal behavior and doesn't that nullify the practical purpose of ChangeKey? Is there any workaround other than giving up the use of this property, and instead manually check for the equality of each meaningful field for event equality?
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 am writing an outlook web Add-In where the user can create an appointment and book a meeting room through the software.
The problem is that once the user closes the Add-In and goes back to the calendar, they can freely change the date of the appointment by dragging it around, and the Add-In cannot see those changes, since it's not open.
That means that those changes do not get registered into the system and are essentially only local to the user who made them. I need a way that I can detect whenever the user changes the date of an appointment, so that I can update the data on my end.
I have heard about subscribing to notifications but I'm not sure that is the best solution. Any Ideas would be highly appreciated.
Not from a web addin - you can do that from a standalone app that continuously runs and uses either the Outlook Object Model (Items.ItemChange event) or EWS to receive the folder notifications. Or you can do that from a COM addin that uses the Items.ItemChange event.
I want to detect an event in Mail Add-in. In Outlook, thick/desktop version, we can detect the mail event, such as MailItem.Send and MailItem.AttachmentAdd.
Is it possible to listen to these events in Outlook online?
Unfortunately there are almost no events of any kind in the Mailbox API, other than asynchronous callbacks that are only fired when you initiate them. There is nothing that I'm aware of that can be used to detect item send or attachment modification events.
The closest option is to use the Outlook Notifications REST API (https://msdn.microsoft.com/office/office365/APi/notify-rest-operations), but these are more suitable to monitoring item/folder level changes. Perhaps you can hook into a notification for the Sent Items folder to approximate a MailItem.Send operation, or watch changes to a draft item to detect a newly added attachment.
nop. you can't do this. Office Apps can't interact with buttons or actions on the client apps such as: Outlook.