Office Scripts gets… buttons

buttons

There’s a new way to launch a macro with Office Scripts!

Script buttons are coming to Office Scripts

You will soon be able to launch scripts with a button, when using Office Scripts in Excel for Web.

(Office Scripts is only available in Excel for Web. As of right now, Office Scripts is not yet available in desktop versions).

How is this new?

It isn’t. The concept of launching a script with a button is nowhere near new.

The new part is that Office Scripts will soon be able to do it too.

Why is this important?

This development edges Office Scripts a little closer toward being a fully fledged automation tool.

In time, it will be rolled out to desktop versions and become relevant to the majority of users.

Until then, its development journey continues. Little features (like the ability to launch a script with a button) will eventually add up to a capable scripting environment that can rival the alternatives.

How can I use buttons with Office Scripts?

You must be using Excel for Web with a Microsoft 365 commercial or educational license.

To add a script button to an existing script in Office Scripts:

  1. From the Automate tab, select a script.  
  2. Go to the More options (…) menu in either the Script Details, All Scripts or Code Editor pane.
  3. Select Add button

This process shares your script with the workbook you add the button to. Users with access to that workbook now have access to your script.

You can read more about sharing scripts at Sharing Office Scripts in Excel for the Web.