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.