LANG SELRCT

Apps Script Reference  (Create: Create new Spreadsheet | Create new Apps Script

Saturday, January 19, 2019

Googleドキュメント全体のフォントサイズを変更したい


ドキュメント全体のフォントサイズを14に変更してみる

これで実現できました。

 DocumentApp.openByUrl(ドキュメントのURL)
  .editAsText()
  .setFontSize(14);



コード.gs
function changeFontSize() {
  var url = "https://docs.google.com/document/d/ID/edit";
  var doc = DocumentApp.openByUrl(url);
  doc.editAsText().setFontSize(14); 
}


参考

editAsText()
https://developers.google.com/apps-script/reference/document/text#editAsText()

Latest post

Extracting data from Google Sheets with regular expressions

Introduction Regular expressions are a powerful tool that can be used to extract data from text.  In Google Sheets, regular expressions ca...