Outlook add in OnSend event to trigger only for appointments, not emails - outlook

Currently I am developing an Add in for Outlook and I have implemented onSend event. Since it is UI-less and it is always triggered, I was wondering is there a way to only trigger it for Appointments not emails? This is because user experience, for them not to have "Add in" triggered when messages are created and sent out.

There isn't a way to restrict On-send to just appointments. One workaround, which I'm sure you are aware of, is to no-op the event handler if the item is a message. This doesn't solve the problem of the add-in running on messages.
We track Outlook add-in feature requests on our Tech Community Page. Please submit your request there and choose the appropriate label(s). Feature requests on Tech Community are considered, when we go through our planning process.

Related

event for automatic reply in outlook like OnNewMessageCompose

The OnNewMessageCompose event is fired On composing a new message (includes reply, reply all, and forward)...
We would want to do some custom modification in an add-in ...when the automatic reply setting is clicked to set ooo message.
Or
It would be helpful to have a onAutomaticReplySet event just like the others in
https://learn.microsoft.com/en-us/office/dev/add-ins/outlook/autolaunch#supported-events
Please let us know if there exists an alternative to it via add-ins or com add-ins or office.js etc
when the automatic reply setting is clicked to set ooo message
OfficeJS doesn't provide anything for that. The best what you could do is to check the properties set during the onSend callback. Also you may consider using Graph API to fill the gap with add-in features and events.
Feature requests on Tech Community are considered, when the dev team go through the planning process. Use the github label: “Type: product feature request” at https://aka.ms/M365dev-suggestions .
We don't support that event as part of our Launch Events extension point. You can submit an idea here.

Outlook replyall to appointmentitem

I am writing a script to reply to AppointmentItem in outlook. The AppointmentItem does not expose ReplyAll (or Reply) method, and that is only available for MeetingItems. However, all the events on a user's calendar are stored as AppointmentItem class, even if there are multiple attendees. I am wondering how I can ReplyAll to an AppointmentItem? Is there any way to get the associated MeetingItem?
PS: When I right click on an AppointmentItem in Calendar it does enable ReplyAll, so there should be a way to do this.
Currently, this API/feature is not a part of the product. We track Outlook add-in feature requests on our Tech Community Page. Please submit your request there and choose the appropriate label(s). Feature requests on Tech Community are considered, when we go through our planning process.

Outlook web add in before send and before delete events

I need to send data (body, location and etc.) from the appointment to my server after the user clicks on Send and Delete button.
I find solution for "Send" event in documentation.
Are there any other hooks for Send event and can I catch Delete event in Outlook web add in?
Thanks.
The only hook for the Send event is the On-Send feature you linked above. Currently, we don't have a hook for the Delete event. We track Outlook Add-in feature requests on our user-voice page. Please add a request there. Feature requests on user-voice are considered when we go through our planning process.

How to send appointment through Outlook add-in?

I'm trying to implement an add-in for Outlook which has some fields and a button that once clicked does some validations and sends an appointment to inform the attendees.
I am using the function below to achieve my goal:
Office.context.mailbox.item.saveAsync()
Office.context.mailbox.item.close() (as a callback for the function above)
It works for office365, but it doesn't work for office365 thick client.
I found in the Microsoft docs that with the function 'saveAsync' in Outlook in cached mode, the item is saved to the local cache. I disabled this option and still getting the same result.
I was using OnSend functionality, but this feature is not supported for Outlook client.
Any advice or tips of how could I have the functionality of sending the appointment through my Add-in in both, client and web version of Outlook? Basically I need to trigger the existing button 'Send' in the calendar.
It sounds like the ItemSend Event (OnSend) you are using in Outlook on the Web handles your scenario. We are working to bring this functionality to Outlook on Windows soon.

How to listen an MailItem event in Mail Add-in?

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.

Resources