我一直想通过 ID 打开访问 Google 演示文稿的内容,但我没有成功,所以我想知道是否有人知道怎么做,请我非常感激,这是我的例子。
var NombreDeUsuario = "MY_NAME";
//This ID is from a google presentation.
var docid = DocsList.getFileById("1uF7xY9_QjSqFsILcq5IxGaJuzK6GlPLO-O4dWVG80cI").makeCopy().getId();
//here is where it says that it doesn´t found it
var doc = DocumentApp.openById(docid).setName(NombreDeUsuario);
var date = Utilities.formatDate(new Date(), "GMT", "yyyy-MM-dd");
var rate = "Excelent";
var body = doc.getActiveSection();
body.replaceText("%DATE%", date);
body.replaceText("%RATE%", rate);
doc.saveAndClose();