How to share a google spreadsheet that contains google app script? - google-apps-script

I followed the tutorial at google developer web site to create a spreadsheet. And as expected when I reloaded the spreadsheet, a menu called "Bracket Maker" is now available on the menu bar.
But if I share this document to my friends, they can open this document, see all the content in the document. But they just don't have the "Bracket Maker" menu bar. How should I do to make sure they also get the script capability?

The menu is created when the onOpen is triggered.
How are you creating the menu - using the onOpen function or an installed trigger ?
If you created it using an installable trigger, then your friends have to set up the trigger manually.

Related

Google Slides - how to automatically run a google add-on and apply custom layout?

I'm currently working on the implementation of the AppScript add-on for Google Slides.
I want my add-on to start when the user opens a new presentation.
I want the add-on to change the layout of all slides, maybe there is a way to import custom layout from file?
Any ideas how to do it?
You could use the on open (simple or installabl) trigger to add a menu and to do some other tasks that doesn't require user authorization but not to change the layout of all slides as something like that requires authorization. For details see https://developers.google.com/apps-script/guides/triggers

Can I add item to Google Docs right-click menu for my Add-on?

I'm writing an add-on for Google Docs, using Google Apps Script and I see that I can add actions to the Add-ons menu using DocumentApp.getUi().createAddonMenu().addItem. My current action launches a sidebar. But that's several clicks away from the user. I'd like to put an option on the right click menu and / or make the action available via a hotkey.
Is there a way to add to the right click menu or create a hot key to launch my add-on item?
You could just launch your sidebar in the onOpen event for the spreadsheet and it will be there right from the start.

Custom sidebar addon for Google Docs

I am trying to write a simple add-on for Google Docs. It basically a list of items I want to have visible on the side when I am using Docs. I followed this simple tutorial.
I don't want to publish such a simple add-on unnecessarily. Is there a way that I could use it just within my Google Docs without publishing it ?
If you've just copied the sample code into your document's script, it already works there. To activate the script you have to reopen the document, then in the menus at the top click Custom Menu -> Show sidebar.
You only have to publish a script if you want to share your add-on with other users.
If you still have problems, take a look at Add-on Quickstart. It describes add-on creation process in details.

How do I get the Script Manager selection to display under the Tools menu item in a Google Sheet?

I'm new to google sheets and scripts and have been trying some of the tutorial on extending sheets. I've noticed that the tutorial demo Sheets have a Script Manager selection under the Tools menu. When I create my own Sheets and related scripts and function, however, I do not get a Manage Scripts selection in the Tools menu.
Why is this? How do I get the Manage Scripts selection in the Tools menu?
Thanks in advance.
This menu item was in the old version of spreadsheets, it disappeared in the new version you are using.

How to dynamically change the spreadsheet of a Google site page?

I've checked this issue and now I know (with getHtmlContent and setHtmlContent) how to create a webapp that :
a) takes into account the active user id
b) selects accordingly the right spreadsheet to be displaid
c) adapts a Google site page with the selected spreadsheet
But my problem is that I want to dynamically adapt the page when the user clicks the link to it (from navigation area). How can I trigger my webapp ?
Thanks for the help !
I don't think it is possible to invoke scripts from links in the Navigation area. But it is definitely possible to invoke an Apps Script on a link in the content area of a Google Sites page.
You can consider invoking your script from such a link