Office.TaskSuggestion interface

Represents a suggested task identified in an item. Read mode only.

The list of tasks suggested in an email message is returned in the taskSuggestions property of the Entities object that is returned when the getEntities or getEntitiesByType method is called on the active item.

Remarks

Minimum permission level: read item

Applicable Outlook mode: Read

Examples

const item = Office.context.mailbox.item;
// Get an array of strings that represent task suggestions in the current item's body.
const taskSuggestions = item.getEntitiesByType(Office.MailboxEnums.EntityType.TaskSuggestion);
console.log("There are " + taskSuggestions.length + " task suggestions.")
taskSuggestions.forEach(function (taskSuggestion) {
    console.log("Assignees: " + JSON.stringify(taskSuggestion.assignees));
    console.log("Task: " + JSON.stringify(taskSuggestion.taskString));
});

Properties

assignees

Gets the users that should be assigned a suggested task.

taskString

Gets the text of an item that was identified as a task suggestion.

Property Details

assignees

Gets the users that should be assigned a suggested task.

assignees: EmailUser[];

Property Value

taskString

Gets the text of an item that was identified as a task suggestion.

taskString: string;

Property Value

string