Office.AsyncResultStatus enum
指定异步调用的结果。
注解
由 status
AsyncResult 对象的 属性返回。
示例
// The following example logs selected text in a document to the console.
Office.context.document.getSelectedDataAsync(
Office.CoercionType.Text,
{
valueFormat: Office.ValueFormat.Unformatted,
filterType: Office.FilterType.All
},
(result) => {
if (result.status === Office.AsyncResultStatus.Failed) {
console.log(result.error.message);
return;
}
console.log(`Selected data: ${result.value}`);
}
);
字段
Failed | 调用失败,检查错误对象。 |
Succeeded | 调用成功。 |
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈