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. |
task |
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
Office Add-ins
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for