我想修改文档以使其在以下示例中似乎是错误的情况下始终应用建议的文本。
目前,我执行了以下操作:
function myFunction() {
var doc = DocumentApp.getActiveDocument();
var body = doc.getBody();
var text = body.getText();
for(var i = 0; i < words.length; i++){
var words = text[i].editAsText();
// here I have to replace the words if it is false et if there is a suggestion
}
}
doc.saveAndClose();
}