【发布时间】:2018-06-26 11:50:15
【问题描述】:
您好,您正在尝试使用 Apps 脚本在 Google 幻灯片的文本框中将一些文本居中。但是它不起作用。不确定当前的功能是什么。网上找不到答案。请帮忙。
var id = template.makeCopy(rows[i][0] + ' ' + rows[i][1],destination).getId(),
slide = SlidesApp.openById(id).getSlides()[0],
shape = slide.insertShape(SlidesApp.ShapeType.TEXT_BOX, 205, 130, 300, 60),
textRange = shape.getText(),
textStyle = textRange.getTextStyle();
textRange.setText([rows[i][0] + ' ' + rows[i][1]]);
textStyle.setFontSize(40);
textStyle.setForegroundColor('#F9B300');
textStyle.setTextAlignment(SlidesApp.TextAlignment.CENTER);
【问题讨论】:
标签: google-apps-script google-slides