Structure of a documentįrom Apps Script's perspective, a Google Doc is structured much like an HTMLĭocument-that is, a Google Doc is composed of elements (like aĮlements. The script could just as easily make these changes to anĮxisting document by replacing the call toįor scripts created inside a document (container-bound), useĭocumentApp.getActiveDocument(). Paragraph as a heading, and appends a table based on the values in a The script above creates a new document in the user's Google Drive, then insertsĪ paragraph that contains the same text as the document's name, styles that Table.getRow(0).editAsText().setBold(true) Var doc = DocumentApp.create('Sample Document') In either case, it's simple to interact with a Google Doc through Apps Script'sĭocument Service, as the following example Tools > Script editor from within Google Docs. To create a container-bound script, select The script special abilities to alter the user interface or respond when theĭocument is opened. Google Apps Script allows you to programmatically create and modify Google Docs,Īs well as customize the user interface with new menus, dialog boxes, andĪpps Script can interact with Google Docs in two broad ways: any script canĬreate or modify a document if the script's user has appropriate permissions for
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |