Microsoft 365 Office 365 Add-ins

Office Add-ins community call–November 11, 2020

November’s call, hosted by David Chesnut, featured the following presenters and topics:

  • Sudheer Maremanda talked about our Webview2 plans going forward.
  • Matt Geimer introduced the new Microsoft 365 certification for Office Add-ins.
  • Abid Rahman showed the new shortcut keys and contextual tabs features that are now in public preview.
  • Courtney Owen showed a demonstration of how to debug Outlook add-ins with Visual Studio Code.

Watch the call here.

Q&A

We welcome you to submit questions and topic suggestions in advance of each call by using our short survey form.

Shortcut keys and contextual tabs

Can shortcut keystrokes be customized by the end user? This is an important feature for users.

Customization of shortcuts are currently not supported, but we are working on it! We may have an update around customizations sometime later in 2021.

Would you be able to assign a keyboard shortcut to a ribbon command that currently does not have one? For example, assign a keyboard shortcut to Insert->Add-Ins->Admin Managed->Refresh.

Unfortunately not. Keyboard shortcuts can only invoke add-in related actions (from within the add-in’s runtime). We currently do not support custom shortcuts for native application actions.

Can keyboard shortcuts invoke functionality in the task pane or only invoke commands defined in the manifest? My add-in currently implements its own keyboard event handler. Will the new keyboard shortcuts provide another way to handle keyboard events?

You can invoke any JavaScript functions you have, including the Office.js API. The actions invoked by shortcuts all require callback functions (defined in the task pane/add-in runtime). The pattern is similar to ExecuteFunction commands for add-in commands. The actions must be defined in the JSON, but their corresponding JS code is in your task pane/runtime.

For your add-in’s keyboard event handler, we’re assuming it is only able to handle keystrokes done while the keyboard focus is within the task pane. For add-in shortcuts, you’ll be able to expand that functionality so users can use shortcuts when the keyboard focus is also within the worksheet.

What happens in the case where multiple add-ins have the same shortcuts?

Currently, this behavior is undefined for public preview. For GA, we will provide a modal dialog to the user the first time they use a conflicting shortcut, which will allow them to select which add-in action to invoke with that shortcut.

Is there a way to programmatically set focus to the worksheet from the task pane?

We currently do not have a focus API.

Does the keyboard focus control keyboard shortcut availability, or the mouse location?

The keyboard focus must be in the worksheet. It’s, not the mouse location, however, if as a user you click inside the task pane with the mouse, the keyboard focus will switch to the task pane.

For keyboard shortcuts… Is this limitation (task pane focus) going to be improved?

We are currently investigating ways to improve this limitation. As a workaround, add-ins can currently make key handlers inside their add-ins that can handle key presses when the keyboard focus is inside the add-in’s UI.

Are there any plans to remove ribbon commands xml from the versionoverrides section of the manifest.xml and replace it with a standalone json file – similar to how the contextual tabs are working?

We have been experimenting with that idea and are investigating if that is possible in the future. We are taking small steps towards that goal by introducing contextual tabs APIs. The contextual tabs APIs require a JS object that defines the ribbon.

For contextual tabs, will it be possible to have a “super/grouping” tab? For example, “Chart Tools” groups the native “Design” and “Format” tabs.

Unfortunately, it is not possible to change the existing native tabs. For example, you cannot combine native tabs into a super tab/show or hide native tabs, etc.… These functionalities are only available for custom tabs created by the add-in.

What if I want to group my custom tabs under a “super” tab similar to the way that those two native tabs group.

You can definitely do that. You can create three custom tabs, for example, Tab 1, Tab 2, and Tab 3. Tab 3 can be a “super” tab that includes all your add-in commands. You’d be able to show/hide tabs 1, 2, and 3 depending on the user’s context.

M365 add-in certification

What is the value of doing the M365 app certification, that differs from the self-attestation?

Self-attestation is a great step for providing documentation, but it doesn’t go as deep into the various security domains and doesn’t include a 3rd party assessment on that. The different areas that are considered for both are available at https://aka.ms/appcertification

Will the Microsoft Certification program Certification hold more power than the “preferred solution” ribbon or would they be shown side by side?

Please take a look at the Microsoft 365 App Compliance program blog post for more information.

Visual Studio Code debug

Does the debug of OnSend only work on the beta channel version?

Debug of OnSend will be available soon in production/GA.

Roadmap and PowerPoint API questions

I’d love to follow-up on one of the questions from the October community call: “In Word we have ‘context.document.save()’ and in Excel we have ‘context.workbook.save()’ – so question is, when will this be implemented in PowerPoint? We are missing a method to close the active document – is this planned and if yes, when will it be released? This is related to both Word, Excel and PowerPoint. ” The response, as always, was to post on user voice…. Please any chance you can follow-up on this and help the community with any info / estimate?

Unfortunately, we don’t have specific ETAs yet, but here are some updates from the team to the PowerPoint API questions asked in the October community call:

In Word we have ‘context.document.save()’ and in Excel we have ‘context.workbook.save()’ – so question is, when will this be implemented in PowerPoint?

context.presentation.save() API is on the roadmap but we do not have an ETA that we can share at this stage. We are prioritizing the API’s based on customer feedback, so make sure to create a request in Office Developer Platform UserVoice or upvote if there is an existing request already.

We are missing a method to close the active document – is this planned and if yes, when will it be released? This is related to both Word, Excel and PowerPoint.

We have added PowerPoint, presentation.close() API to the roadmap but we do not have an ETA that we can share at this stage. We are prioritizing the API’s based on customer feedback, so make sure to create a request in Office Developer Platform UserVoice or upvote if there is an existing request already.

We’d like to see better parity between the specific host PowerPoint API with the control that was available in VSTO add-ins for PowerPoint. We have an add-in we want to build out in the new web add-in platform, but can’t due to the extremely limited capabilities of the current Office.js API.

We have recently started focusing on reducing the PowerPoint’s OfficeJS surface gap. The first set of PowerPoint OfficeJS API’s are available in the preview channel and more will be coming soon.

Is there an accessible updated roadmap for where the office-js api is heading and what features are being developed on what timescale for which office applications? This would be really helpful. I have seen several requests for this in the past. Also, is there a plan to follow up on this request? https://officespdev.uservoice.com/forums/224641-feature-requests-and-feedback/suggestions/33200554-powerpoint-api

We definitely hear you that we need a better roadmap and communication around API plans. This is something we’re working on and hope to share more information soon.

For now, the best way to track new features and updates coming out for preview or general availability is to keep an eye on the Microsoft 365 developer blog. We of course also cover upcoming schedule and plans in this community call.

We also have host specific preview APIs that are in development which you can participate and provide feedback on.

Miscellaneous questions

The only way I have been able to successfully debug and step through code is by using Visual Studio 2019. I am currently running into an issue with debugging if I use create document because it loads in a new Word context. Any advice?

There’s a section in our docs on debugging that may help. Otherwise please post a question on Stack Overflow tagged [office-js] with more details so folks can take a look and help.

We have developed an Office Add-in for Excel, when an updated manifest is uploaded, the next time Excel is opened, the add-in should be updated. While this holds true for the add-in panel, the command ribbon is not showing the latest changes for all users. Some see it right away, but others have to go into Admin Managed and do a refresh to get the latest, or clear the cache in %LOCALAPPDATA%\Microsoft\Office\16.0\Wef\. Is there a way to force an update command ribbon without the end user having to do a Admin Managed-Refresh or clear the cache manually?

Can you please log an issue on GitHub at: https://github.com/officedev/office-js/issues please? This sounds like a bug, as commands should refresh when the store add-in is updated.

Can the yeoman scaffolding use a .NET server instead of starting its own?

Yes, it can use any server. You would need to update the yo office project start script to not call the dev-server script.

I’m running the following code from the getRestApiId() documentation:

OneNote.run(function(ctx){
    // Get the current page.        
    var page = ctx.application.getActivePage();
    var restApiId = page.getRestApiId();


    return ctx.sync().
        then(function(){
            console.log("The REST API ID is " + restApiId.value);
            // Note that the REST API ID isn't all you need to interact with the OneNote REST API.
            // This is only required for SharePoint notebooks. baseUrl will be null for OneDrive notebooks.
            // For SharePoint notebooks, the notebook baseUrl should be used to talk to the OneNote REST API
            // according to the OneNote Development Blog.
            // https://blogs.msdn.microsoft.com/onenotedev/2015/06/11/and-sharepoint-makes-three/
        });
});

However, the result is always empty. If I change to getActiveNotebook() everything seems to work fine. The OneNote file is stored on personal OneDrive. Is this a bug? I’m blocked.

Sorry that you are running into this. This does look like a bug, so we are investigating. Can you post an issue on GitHub at https://github.com/officedev/office-js/issues? We’ll post any updates to the issue.

In the new Outlook for Mac experience, can support be added for add-in individual buttons to be displayed on the ribbon rather than grouped under an add-in icon? For multi-button add-ins the grouping is going to impact our user-uptake if sensible button labels are not seen in the ribbon by default.

Thank you for the feedback. We are evaluating this request currently and will let folks know in the near future if we plan to add this support.

Will there be support for admins automatically pin add-ins to the taskbar in the new Outlook for Mac UI? By default, the add-in is not visible on screen and hidden under the ‘…’ menu.

We do not have a capability for add-ins to be pinned by Admins; however, users can customize their own toolbar and pin add-ins. We are exploring various measures such as a first-run experience and pinning frequently used add-ins to improve add-in discoverability.

 Regarding the recent change to Exchange on-premise OWA where if a security update had not been installed on the server within two days add-ins stopped working, can the add-in team do something to improve communication of such changes so that developers are aware beforehand and can prepare steps for customers who encounter issues when a new version of the office.js scripts are deployed?
The security update was essential to improve the security around add-ins across all Office products. The nature of the vulnerability required customers to update to the latest security update and prevented us from sharing information around it. However, we appreciate your feedback on providing additional documentation around these types of releases and will work towards better communication in the future.

My understanding is that other than on the iPad (where Word and Excel are supported as well), the only mobile app that allows JS add-ins is Outlook. Are there plans to add add-in support to Word and Excel on iOS and Android? Will Outlook support add-ins for Gmail accounts (currently I understand only Exchange supported?)

Currently we don’t have plans this year to do more on iPad for Word, Excel, or PowerPoint.

Outlook Add-ins have client and server requirements, and therefore not supported elsewhere but Exchange. There’s more information in the article, Outlook JavaScript API requirement sets.

When required to use EWS with on-premises Exchange, my Outlook add-in gets a bearer token with getCallbackTokenAsync() and the endpoint from the property Office.Context.Mailbox.ewsUrl. When the external and internal EWS URL differ, the token correctly target the external EWS URL (confirmed by its audience claim), but the ewsUrl is almost always the internal EWS URL, so the endpoint can’t be called from a third party service (like my server) and even if it could, the token would be invalid. Is there an additional requirement to get or set the external EWS URL when running on an on-premises mailbox?

We need more information to help answer. Can you post this question as an issue on https://github.com/officedev/office-js? It would help to know the client version, server version, and repro steps. We can follow up from there.

Resources

From November’s call

Office Add-ins community call

Office Add-ins feedback

The next Office Add-ins community call is on Wednesday, December 9, 2020 at 8:00AM PDT. You can download the calendar invite at https://aka.ms/officeaddinscommunitycall.

 

filter-icon