You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Apps Script Community
Hi all,
In Google Docs, is there a way yo change the Page Color for a Doc using Apps Script? It can be set through the File Menu (File->Page Setup), but I want to change it dynamically through a custom menu/Apps Script.
Thanks.
Tanaike
unread,
Apr 21, 2020, 8:00:36 PM4/21/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Apps Script Community
You want to change the background color using Google Apps Script.
If my understanding is correct, how about this answer? Please think of this as just one of several possible answers. In this answer, "getAttributes()" in Class Body is used.
Sample script
const doc =DocumentApp.openById("###");// Please set the Document ID.