Office.MailboxEnums.SourceProperty enum

Specifies the source of the selected data in an item (see Office.mailbox.item.getSelectedDataAsync for details).

Remarks

[ API set: Mailbox 1.2 ]

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.