Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-apps-script/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google apps script 如何将缩进设置为Google幻灯片形状文本_Google Apps Script_Google Slides Api_Google Slides - Fatal编程技术网

Google apps script 如何将缩进设置为Google幻灯片形状文本

Google apps script 如何将缩进设置为Google幻灯片形状文本,google-apps-script,google-slides-api,google-slides,Google Apps Script,Google Slides Api,Google Slides,我们正试图通过使用谷歌应用程序脚本设置左/右缩进值来缩进谷歌幻灯片形状 function indentShape(){ var slide = SlidesApp.getActivePresentation().getSlides()[0]; var shape = slide.getShapes()[0]; // shape.setIndent(Left,Right) shape.setIndent(10,20) } setIndent()。 幻灯片脚本的功能包括方法s

我们正试图通过使用谷歌应用程序脚本设置左/右缩进值来缩进谷歌幻灯片形状

function indentShape(){
  var slide = SlidesApp.getActivePresentation().getSlides()[0];
  var shape = slide.getShapes()[0];

  // shape.setIndent(Left,Right) 
  shape.setIndent(10,20)
}
  • setIndent()。
    
  • 幻灯片脚本的功能包括方法
    setIndentStart(indent)
    setIndentFirstLine(indent)
    setIndentEnd(indent)
  • 下面是如何使用这些方法的示例:
    shape.getText().getParagraphStyle().setIndentStart(20)
  • setIndent()。
    
  • 幻灯片脚本的功能包括方法
    setIndentStart(indent)
    setIndentFirstLine(indent)
    setIndentEnd(indent)
  • 下面是如何使用这些方法的示例:
    shape.getText().getParagraphStyle().setIndentStart(20)

  • 您当前的代码在做什么?您是否收到任何错误消息?它会缩进你的形状吗?类型错误:在对象形状中找不到函数setIndent。你当前的代码在做什么?您是否收到任何错误消息?它是在缩进你的形状吗?类型错误:在对象形状中找不到函数setIndent。