我試圖將以下代碼移植到DriveApp,但在遷移到「DriveApp.append」時,「doc.append」功能不起作用。將代碼從DocList移植到DriveApp
function process(thread, threadStart, folder, pass){
var start = Date.now();
var label = folder.getName();
var html;
if(pass > 1){
var docID = folder.createFile(label + "(part " + pass + ")", '<html>', MimeType.HTML).getFolderById();
}
else{
var docID = folder.createFile(label + "(part 1)", "<html>", MimeType.HTML).getFolderById();
}
var doc = DocsList.getFolderById(docID);
try{
doc.append(globalTOC(total_messages(thread), thread.length, label));
}
catch(exception){
Utilities.sleep(5000);
doc.append(globalTOC(total_messages(thread), thread.length, label));
}