Script Lab now supports Outlook

Office Add-ins team

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 to build Office add-ins that run across platforms.

Script Lab for Outlook features

Code

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 Visual Studio Code, so it’s beautiful and lightweight.

Run

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

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).

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. The add-in is currently 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!

Get familiar with Script Lab for Office on each platform

The following screenshots show how you can access Script Lab for Outlook on each supported platform.

Script Lab for Outlook on the web

In Outlook on the web, Script Lab for Office appears in the left navigation pane.

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

Script Lab for Outlook on Windows desktop

On Windows desktop and in Outlook on Mac, find the Script Lab section on the ribbon to open the task pane.

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

Script Lab for 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 and on GitHub! Happy coding!

Additional resources

Outlook JavaScript API reference

Outlook Dev Center

Script Lab Quick start

 

Feedback usabilla icon