0

I'm using the following function, to create a new doc. (this function's bound with a googledoc using appscript)(it work when i execute the script)

function createDoc() { var doc = DocumentApp.create('Document Design Compatibility'); var body = doc.getBody(); var rowsData = [['Ex', 'xE'], ['Ex', 'xE'], ['Ex', 'xE'], ['Ex', 'xE']]; body.insertParagraph(0, doc.getName()) .setHeading(DocumentApp.ParagraphHeading.HEADING1); table = body.appendTable(rowsData); table.getRow(0).editAsText().setBold(true); } 

And actually , I would like to execute this function when i click on a button in my GoogleAppMaker application.

When I call createDoc() on the onClick() method of my button , it's doesn't work.

3
  • This is a very common question. You need to call the server script from the client script. It is explained here Commented Jun 18, 2019 at 13:18
  • 1
    Possible duplicate of Generating an email list from AppMaker Database Commented Jun 18, 2019 at 13:19
  • thank you very much, my question was very common i'm sorry about that. But i succeed :D Commented Jun 18, 2019 at 15:02

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.