Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
Office.Item interface
- Package:
- outlook
The item namespace is used to access the currently selected message, meeting request, or appointment. You can determine the type of the item by using the itemType property.
If you want to see IntelliSense for only a specific type or mode, cast this item to one of the following:
Remarks
Minimum permission level: restricted
Applicable Outlook mode: Appointment Organizer, Appointment Attendee, Message Compose, Message Read
Used by
Examples
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-item-type.yaml
const itemType = Office.context.mailbox.item.itemType;
switch (itemType) {
case Office.MailboxEnums.ItemType.Appointment:
console.log(`Current item is an ${itemType}.`);
break;
case Office.MailboxEnums.ItemType.Message:
console.log(`Current item is a ${itemType}. A message could be an email, meeting request, meeting response, or meeting cancellation.`);
break;
}
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
Feedback
Was this page helpful?
