在 Google 表单中如何用文本替换提取值?

In Google Form how to replace an extract value by a text?

如何用指定文本替换 google 表单中的值? 例如:

Q1:你睡得好吗? A)是的 B) 否

--------> If A "The subject say he sleep well" if B "......" 作为对这个问题的回答。

我在提交表单时尝试过这种技巧:

function onFormSubmit() {
docReplace();
}

function docReplace() {

var body = DocumentApp.getActiveDocument().getBody();
// change
body.replaceText("Yes", "A new text");

}

感谢您的帮助!

塞巴斯蒂安。

我发现无法在提交过程之前修改答案。现在,基于我 sheet 中的 awnsers,我使用 Google 文档中的脚本来修改我的报告文档的文本。