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.
Related
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
I am creating a google apps script for a private reason but this is nothing about the code. If you are confused by the title, I will explain what I mean:
I'm pretty sure most google drive users have used add-ons before. When you launch an addon, it runs a script. Perfectly normal, but the thing is, you don't know when it is running a script because there isn't anything indicating it. What I want is to hide that big blue bar that appears when you run a script.
I tried looking at Google Apps Script's website but if you tried searching something like this on the web, your browser won't understand you which is why I decided to use stack overflow.
Here is a picture of what I want to get rid of:
as you can see here the I want to hide the "Finished Script" thing using Google Apps Script or some other way.
Based from this blog, as soon as you click the Apps Script button, you’ll see a yellow bar "Running function <function-name>". This will indicate that the script is running. When done, the bar will read “Finished Script”. This is a built-in Google Apps Script feature. I think you will not be able to remove this feature.
I am trying to create a branching scenario using google slides, the idea is that someone viewing the presentation can click on the buttons and see the outcome of their selections.
The first few slides it's easy, it's a 1 to 1 so I can just use the "link" feature in slides.
The tricky part is once you progress to slide 3. I want the slide they are directed to by clicking on the "course of action" options to be based on all the currently selected options.
So here is where I'm stuck - I need to figure out how to have an interaction (click) with the slide in presentation mode trigger a script.
Any suggestions on how to accomplish this in Google Slides?
At this time the Slides Service for Google Apps Script and the Google Slides REST API don't include a way to call a script on a click of an element. This feature is only included on Google Sheets (Clickable images and drawings in Google Sheets)
NOTE: The Google's official documentation very rarely includes a page about missing features. It could be possible that someone already submitted a feature request through the official Issue Tracker. If so, you could star that issue to get notifications about changes on it. Another place to monitor is the G Suite Developers Blog and the Google Apps Script release notes.
I have a Google Doc add-on that utilizes the sidebar: no problem there. When one uses the Google research add-on, there is an secondary slide out from the sidebar that shows a preview of a search result (see picture below) when clicked. I am hoping to replicate this behaviour, but I see nothing about it in the api regarding size and limits. I tried having a tooltip pop up on my links in the sidebar, but they appear cut off or under the main Google Doc palette. I have tried a bunch of other Google Doc add-ons to see if any of them replicate this functionality, but they don't. Before I spend hours on this, I want to first ask is anyone know if this is specific permission for Google's sidebar only, or can developers replicate this functionality?
The Research Tool is a direct integration with Docs and Presentations, it's not a Google Apps Script add-on. The freedom to "slide out" within the document is not available to add-ons today.
As one alternative, you could use an accordion affect to collapse your "first page" and overlay the result page, still within the bounds of the sidebar.
A second alternative would be to use a non-modal window, where you'd have more freedom. (resizing there requires client-server exchanges, but is doable)
Is it possible to create "custom menu" for all of my Google Documents ?
All i need is when ever a new Document/Spreadsheet is created, and the work is done then the user should be capable of invoking a Custom Menu.
So i would like to display the "Custom Menu" for all of my documents.
this is possible by building an add-on. first make the menu:
https://developers.google.com/apps-script/guides/menus
then see the official documentation from Google which explains in detail how to publish your add-on.
https://developers.google.com/apps-script/add-ons/