How to trigger google doc script with button or by editting it?

邮差的信 提交于 2019-12-11 17:42:02

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!