Taskinterface
Represents a task with additional methods for interacting with Outlook.
Properties (14)
| Property | Type | Default | Required | Description |
|---|---|---|---|---|
| actualWork⚓︎ | number | x | The actual work done on the task, in minutes. |
|
| attachments⚓︎ | Attachment[] | x | An array of identifiers for the attachments to the task. |
|
| body⚓︎ | string | x | The body text of the task, formatted as a plain string. |
|
| cookie⚓︎ | string | x | x | The cookie of the task. |
| creationTime⚓︎ | Date | x | The time at which the task was created, using local time for the sender. |
|
| dateCompleted⚓︎ | Date | x | The time at which the task is due to be completed. |
|
| dueDate⚓︎ | Date | x | The due time of the task. |
|
| entityType⚓︎ | number | x | The entity type identifier for the task. |
|
| ids⚓︎ | T42Id[] | x | The originator of the task. |
|
| importance⚓︎ | number | x | x | The importance of the task - 0 for low, 1 for normal and 2 for high. |
| priority⚓︎ | string | x | The priority of the task. |
|
| reminderTime⚓︎ | Date | x | The reminder time of the task. |
|
| startDate⚓︎ | Date | x | The start date time of the task. |
|
| subject⚓︎ | string | x | The subject field of the task. |
2 Methods
saveToFile()⚓︎
() => Promise<string>
Saves task as .msg file.
Example
await outlook.newTask(
{
subject: "Sample subject",
body: "Sample body",
priority: "high",
dueDate: new Date("2017-07-01"),
},
{
onSaved: async (task) => {
const uri = await task.saveToFile();
console.log(uri);
},
},
);