使用Google Apps脚本,"Method makeCopy(string,string) not found"调用以下函数时出现错误。但是我看不到我的错误。Google Apps脚本的自动完成功能甚至提供了该方法。
function createDuplicateDocument(sourceId, name) {
var source = DriveApp.getFileById(sourceId);
var newFile = source.makeCopy(name, TARGET_FOLDER);
return DriveApp.getFileById(newFile.getId());
}
Run Code Online (Sandbox Code Playgroud)
(变量TARGET_FOLDER是全局变量。)
你们中有人有想法吗?