Outlook Add-ins

Script Lab now supports Outlook!

Wouldn’t it be amazing if you could launch Outlook, open a small code window, and then instantly start writing and executing JavaScript that interacts with your emails and appointments? Recently, we released Script Lab for Outlook which lets you do exactly that and it’s quite a good way to learn the JavaScript APIs for Outlook! The Script Lab for Outlook add-in is built in the same codebase as the Script Lab add-in for Excel, Word, and PowerPoint.

Whether you’re new to writing code for Outlook or an experienced developer trying to prototype a feature for your add-in, Script Lab is a tool to learn about writing Office.js code for Outlook. The focus is the Office JavaScript API, which is the technology you need for building Office add-ins that run across platforms.

Script Lab for Outlook has three main features:

Code in a floating window opened from your email or appointment. IntelliSense shows suggestions while you type so you can easily discover and use the Office JavaScript objects and methods. And if you don’t want to start from scratch there are plenty of samples preinstalled with Script Lab. Your snippets can use any TypeScript features like the magical async/await and conveniences like arrow functions and template strings. But it’s not only script: your snippets can also use HTML and CSS, and reference external libraries and data on the web. Script Lab uses the Monaco editor, the same tech that powers VS Code, so it’s beautiful and lightweight.

Run the code in the task pane beside your email or appointment. You can include logic, API calls to Office, UI in the pane, and even output to a console. Every time you make a code change, the editor refreshes, and you can run the new version in seconds.

Share your snippets through GitHub. If you create a snippet you’d like to share, you can use Script Lab to save it then send the link to someone else for them to try it and tweak it on their computer. The Import feature lets you load other people’s snippets. We think sharing will be especially useful for asking and answering questions about add-ins on Stack Overflow (tag office-js on general add-ins questions or outlook-web-addins on Outlook add-ins questions).

Right now, you can install Script Lab for Outlook, free from the Office Store. It works in Outlook 2013 and later on Windows, and Outlook 2016 and later on Mac. Currently in, the add-in is only supported in Chrome, Microsoft Edge, and Safari.

The source code in the script-lab repo is open to the community. We welcome your contributions to the tool and to our snippets repo. We’re excited to keep improving Script Lab with your help!

The following are a few screenshots to get you oriented on each platform:

How to access Script Lab in Outlook on the web

Screenshot showing how to access Script Lab in Outlook on the web using the overflow menu.

Script Lab Code window and Run pane in Outlook on Windows desktop

Screenshot showing Script Lab ribbon buttons and task pane in Outlook on Windows desktop, and the Code window.

Script Lab Code window and Run pane in Outlook on Mac

Screenshot showing Script Lab ribbon buttons and task pane in Outlook on Mac, and the Code window.

We’d love your feedback on Github!

filter-icon