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

スプレッドシートA列にある複数のテキストをスライドに追加したい(Google Apps Script)

今回Google Apps Scriptでやりたいこと GoogleスプレッドシートA列にある複数の値を取得して Googleスライドに渡して 図形オブジェクトのテキストとして追加したい ① スプレッドシートのA列に値を入れておく ② Code.gsのinsertNewShape...