Is it possible in an office add-in (using office-js) to detect when the user creates an appointment in Outlook ?
No, there is no straight forward way via Office-js.
Basically Outlook web addins are scoped to the item in preview, i.e, user invokes the add-in on a mail item (message / calendar event) and add-in can work with the item it was invoked on.
But if your addin has ReadWriteMailbox permission, there is a roundabout way to acheive the same using REST
Get REST token using Office.context.mailbox.getCallbackTokenAsync API.
Using REST push notifications you can listen on event created.
Related
I have written an Outlook web addin that uses a manifest which includes an AppointmentOrganizerCommandSurface extension point. So the addin shows in the ribbon for a new meeting/appointment item created by the user in desktop Outlook 2016.
The initial page loaded in the Outlook pane for the addin simply uses a javascript function (Office.onReady) to pull the email address of the user with loadItemProps(userProfile).
It seems that when a user runs the addin for the very first time the open appointment item is automatically saved to the calendar as soon as the manifest is loaded by Outlook. This does not happen after the first time use of the addin.
There is nothing else happening on the initial page other than the Office.onReady. So it looks like Outlook is doing this when the AppointmentOrganizerCommandSurface is initiated the first time.
Is there a way to prevent this from happening?
Is it possible to add a button to the command ribbon for the calendar overview in outlook. The PrimaryCommandSurface extensionpoint doesn't seem to be supported in Outlook add-ins. Adding a button to the appointment edit window isn't enough, because I need to perform an action for the whole calendar.
Currently the feature you requested, Outlook add-in button on command ribbon for calendar overview, is not a part of the product. However, we track Outlook add-in feature requests on our user-voice page. Please add your request there. Feature requests on user-voice are considered when we go through our planning process.
[Outlook Add-ins Engineering Team]
For an Outlook add-in using add-in commands (office.js), the ribbon buttons under the AppointmentOrganizerCommandSurface extension point are disabled when creating a meeting in Outlook 2016 in a calendar for which the user has been granted delegate access.
The same add-in running under OWA is able to operate on the delegated calendar with no issues.
Is this a bug with Outlook 2016 or is there something else I need to do to make this work?
Note that for Outlook 2016 when the meeting compose view is open for the delegated calendar, the generic "Office Add-ins" ribbon button is also disabled.
Delegated Mailboxs/Items are not supported by Outlook Add-ins at this time.
If you would like to request this feature, please do so through UserVoice:
https://outlook.uservoice.com/forums/284136-outlook-com/category/132039-add-ins
I want to customize the appointment window used in Outlook. I want add few custom fields. I am using VSTO (VS2013) to develop this addin.
So far I have added a button in ribbon of appointment tab. On click of which I am opening a new form with custom fields. Now when user completes the form and other appointment details and appointment is saved then along with all appointment data, custom data entered by user should also get emailed to recipients.
And also that custom data would be stored in Exchange, and later that data can be queries to generate report.
So my question is - how do override the save appointment event so that I can add additional data in appointment and also how do I save it to exchange online using office 365.
Please advise.
Thanks.
When you are using an Exchange account which is the case with Office 365. The UserProperties of an Outlook item is kept in Exchange.
You can persist the custom data in UserProperties
If you want to Save your custom data when the appoitment is saved. You should put an event handler in the AfterWrite event. See AppointmentItem event list.
I have created a Document library in SharePoint 2010 site. Now I want to execute some code whenever new document is added to this Document library.
How do I implement this? Do I need to implement Item Event Listener? and how this Item Event Listener will be connected to Document library. Can I call a Web service into Item Event Listener?
Be careful reading links that pertain to sharepoint 2010. Sharepoint 2007 links may contain out of date logic.
In how they dispose of SPSite/SPWeb objects
Not using properties.Cancel
EventFiringEnabled instead of DisableEventFiring()
http://msdn.microsoft.com/en-us/library/ff728093.aspx
http://msdn.microsoft.com/en-us/vstudio/Video/ff623003
For binding the receiver to a list
http://social.technet.microsoft.com/Forums/en-US/sharepoint2010programming/thread/19d9ccac-0bfd-4923-8518-8decedc4617d
And it you have the permissions right, you should be able to do most things in an event receiver. Look into elevating the user context.
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spsecurity.runwithelevatedprivileges.aspx