1
votes

I developed an Outlook Addin that intercept the creation of new appointment items using the ItemsEvents_ItemAddEventHandler handler.

How can I detect if the new appointment is created by my local client or by a remote one (like web/mobile application)?

I need to intercept only the appointments created by my client (using the new appointment window or just typing on the calendar).

Thanks

1

1 Answers

0
votes

There is no trivial way to detect new items creation with the ItemAdd event handler only. Moreover, the Outlook object model doesn't provide such information out of the box.

You can handle the NewInspector event and check whether a new appointment item is created. For new items the EntryID property value is empty (String.Empty).

Also you may try to handle the SelectionChange event of the Explorer class where you may check the Selection object. If it also contains an item with an empty string for the EntryID property then it is a new one.

Thus, you will be able to distinguish items and get a definitive answer whether they were created by users or not.