问题
I'm trying to summarize info sent by a form (to make purchase requests) on a google doc with a way to approve the request or not from the google doc and retrieve the information in a Google Apps Script function.
The problem is that on Google Document the trigger onEdit doesn't exist.
Is there a way to create one ?
Or simply add a button to validate the request that would call a function ?
Thanks.
回答1:
The only way to add a button that calls an Apps Script function on a Google Documents document is by creating a dialog or sidebar. This is done by using the HTML Service. For further details see https://developers.google.com/apps-script/guides/html/
来源:https://stackoverflow.com/questions/51708615/how-to-trigger-google-doc-script-with-button-or-by-editting-it