Microsoft Office development kit in public preview for Visual Studio Code – looks far from ready

Microsoft Office development kit in public preview for Visual Studio Code – looks far from ready

Microsoft has released a public preview of an Office development kit for Visual Studio Code (VS Code) – but developers may have a tricky time migrating from older add-ins or even navigating the documentation.

Microsoft Office applications remain ubiquitous in business, but the software titan has struggled to build the same momentum for add-in development that existed in the pre-cloud era – when it was all about Windows, COM and either Visual Basic for Applications or VSTO (Visual Studio Tolls for Office) using .NET code.

These older technologies were installed locally, and mostly ran on desktop Windows only. Microsoft therefore introduced a web-based model for add-ins that worked cross-platform – including mobile and web versions of Office. 

Since the technology is cross-platform, it  also makes sense to support non-Windows developers, so the new Office Add-ins Development Kit for VS Code provides that.

Subscription needed

The extension requires Node.js 16, 18 or 30, and the node package manager (npm). A Microsoft 365 subscription is also required. Once installed, it provides the ability to start skeleton projects for Word, Excel or PowerPoint, easy preview of projects, and real-time update – so that code changes are immediately seen in the running add-in. There is also a sample gallery, which developers can clone and adapt.

Product manager Minglia Liu said that the kit is “a new development tool to help you set up your environment, create Office add-ins, and debug the code with a streamlined developer experience in Visual Studio Code.” There is no indication of when general availability might be, but Liu did reveal that the team is working on adding “support for add-ins to other Office applications and platforms.”

The heart of Office add-in development is the Office JavaScript Library, which is documented here.

Developers have faced a number of issues with Office add-in development, though. In general the JavaScript APIs are both different to and not as powerful as the COM-based API they replace. There is also little in the way of a migration path from legacy Office add-ins – many of which continue to do duty in custom business applications. The migration guide states that “you’ll be working with a different language (either JavaScript or TypeScript) instead of C# or Visual Basic .NET.” The main hope for reusing code is to move functions that do not interact directly with Office to a web application, where they can be called from JavaScript. Some developers have experimented with using Blazor WebAssembly, which runs C# in the browser, in order to continue with .NET code for Office add-ins.

Developing an Office add-in with VS Code on a Mac, using the preview developer kit

Confusing

The preview development kit is somewhat confusing for developers getting started. The documentation links are, in the main, not specific to the new kit but general ones for Office add-ins, and bounce the developer between overviews, tutorials and reference.

We also noticed, when trying the kit, warning notices from npm – such as one for a dependency called inflight, which reads “this module is not supported, and leaks memory. Do not use it.”

This is a public preview, so issues are to be expected – but it looks as if Microsoft has considerable work to do.