AppsScriptPulse

How to easily add the same Custom Menu to Docs, Sheets, Slides and Forms with Google Apps Script

Use Google Apps Script to create a custom menu that will work inside Google Sheets, Google Docs, Slides and Google Forms.

Tired of writing separate code for custom menus in Docs, Sheets, Slides, and Forms? This nifty Google Apps Script snippet by Amit Agarwal helps you build a universal menu that works across all these apps!

The solution is a small snippet which detects the context to see which of DocumentApp, SpreadsheetApp, FormApp, SlidesApp are available which then lets you switch to get the appropriate .getUI() method.

Check out the source post for the full code and streamline your add-on development!

Source: How to Add a Universal Custom Menu to Multiple Google Workspace Apps – Digital Inspiration

Leave a Reply

Your email address will not be published. Required fields are marked *