1

I have created some content bounded scripts (Tools->Script Editor) for private use. The scripts add a sidebar, and use a timer to copy the content from the sidebar to a Google document at the cursor position. It is important that the insertion happens at the cursor.

I want to share these scripts with others, as well as add them to old documents. All suggestions I have seen so far involves creating a template document with these scripts and then sharing the template document. This option is not feasible for me. One of the concerns is, these scripts need to be added to existing documents. Creating a new document, and merging it with the old one is not working (the original documents are complex, and migrated documents loose formatting).

Is there an easy way to share/insert these scripts? So far, I have failed to implement any of the below obvious options:

  1. Export Script Editor project to somewhere, and then import it in another document.
  2. Create an app script in drive, and then import it in an existing document.
  3. Publish this as add-on (N/A since this is not a public project, and not complete yet either).

I'm not sure if it is feasible to publish my scripts as a webapp, then write a simple container-bound application to call my webapp with document id as suggested at Deploying container-bound Google Apps Script as Web App However, this requires webapp to insert the text at cursor position of the active window. I doubt that is possible.

I'm hoping that somebody found an easier way, and willing to share it.

I appreciate any help.

Sincerely,

Community
  • 1
  • 1
hakca
  • 11
  • 1

1 Answers1

0

Converting your script to an add-on is the recommended way to distribute across multiple users and documents. We understand this solution doesn't always work when the script is not meant for general consumption. Add-ons can be published only to a single domain however, so if all of your users are within a Google Apps domain then add-ons may still be an option.

Eric Koleda
  • 12,420
  • 1
  • 33
  • 51