OfficeDev / generator-office

Yeoman generator for building Microsoft Office related projects.
https://www.npmjs.com/package/generator-office
MIT License
818 stars 207 forks source link

Outlook Addin created using yo office get disabled after selecting multiple emails. #768

Closed vchaudhari2912 closed 1 year ago

vchaudhari2912 commented 1 year ago

Prerequisites

Please answer the following questions before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.

Expected behavior

Addin should be enabled when multiple email selected. (Working fine for single email selected)

Current behavior

When single email selected, My adding enabled and I can able to use it. Once multiple email selected it get disabled

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

Create project using Yo office, install addin in outlook

Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

millerds commented 1 year ago

The project created by 'yo office' is a simple task pane for an individual item. You can looks at the documentation at https://learn.microsoft.com/en-us/office/dev/add-ins/outlook/item-multi-select to see how to change it to support multi select. Note that multi select support is only in preview on Windows right now. More work is needed in order to finish it and extend it to Mac.

vchaudhari2912 commented 1 year ago

Is there any way then I can get list of emails on the task pane?

millerds commented 1 year ago

The office.js API provides access to the currently selected item and it properties.

https://learn.microsoft.com/en-us/javascript/api/requirement-sets/outlook/requirement-set-1.11/office.context.mailbox.item?view=powerpoint-js-preview