Office.AsyncResultStatus enum
Specifies the result of an asynchronous call.
Remarks
Returned by the status
property of the AsyncResult object.
Examples
// 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}`);
}
);
Fields
Failed | The call failed, check the error object. |
Succeeded | The call succeeded. |
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Office Add-ins