Office.MailboxEnums.SourceProperty enum
Specifies the source of the selected data in an item (see Office.mailbox.item.getSelectedDataAsync
for details).
Remarks
Applicable Outlook mode: Compose
Examples
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/20-item-body/get-selected-data.yaml
Office.context.mailbox.item.getSelectedDataAsync(Office.CoercionType.Text, function(asyncResult) {
if (asyncResult.status === Office.AsyncResultStatus.Succeeded) {
const text = asyncResult.value.data;
const prop = asyncResult.value.sourceProperty;
console.log("Selected text in " + prop + ": " + text);
} else {
console.error(asyncResult.error);
}
});
Fields
Body = "body" | The source of the data is from the body of the item. |
Subject = "subject" | The source of the data is from the subject of the item. |
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