Office.AsyncResultStatus enum
非同期呼び出しの結果を指定します。
注釈
AsyncResult オブジェクトの status プロパティによって返されます。
例
// 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 | 呼び出しが成功しました。 |