I've been wanting to create a script that is accessible from any newly created Google Doc or Google Sheet. Is there any way to accomplish this? For example, if I wanted to create a script that inserted the current date and time in a specific format into a Google Doc, I have to copy and paste that code into each new sheet. If I programmatically create a document, its also not there and must be copied and pasted in. Anyone ever accomplish this?
1 Answer
Yes there is a way and many people already accomplished this (including me) by publishing the now called G Suite Add-ons. For details please read https://developers.google.com/gsuite/add-ons
I already mentioned two of my add-ons here on Web Applications, Record Viewer and Spreadsheet Freezer.
Record Viewer
- In Google Sheets: How do I merge a range of a row (the header) with the range of each column into a single cell?
- Viewing & editing data in Google Sheets using a form
Spreadsheet Freezer