Control width of office.js add-ins (outlook) task pane

Control width of office.js add-ins (outlook) task pane



 Apr 14 2022
3 Comments (3 New)

Currently task panes are a fixed width by default. Users can manually increase the width but cannot reduce it. In addition neither users nor their organisations (customers) want to perform a manual action such as expand/reduce the width.


What is need is the ability to control the width for the following reasons:

1) the current width takes up too much screen real estate, especially for employees with small screens

2) users do not want to see the task pane with all info all the time, but do want it operating


Preferred action

Ability to control the width through JS/Typescript


Desired scenario

Our add-in pushed via corp. IT will exist with message open (most likely preview pane on when viewing the inbox).

It is pinned.

The add-in by default is slim in width, displaying basic info.

On opening a message the add-in performs an action and makes an API request.

The response will cause an action, it may maintain the slim width and will display updated basic info, or may expand to display further information.

A pop-open style response - this is what every customer is requesting.

The user will have the ability to expand at any time, but by default it is slim.



1) We have reviewed dialog windows, but this does not meet the requirement. It requires a user to perform an action each time, that a pinned task pane does not. Customers do not want to rely on their users to click each time.


2) VSTO looks to provide the ability to control width, but a) it is legacy and on its way out according to MS, b) we're limited in features such as azure auth/graph api which the add-in is currently using.


This is causing us substantial pain as our customers have this as a mandatory/critical request.

Occasional Visitor

We're in the opposite boat.  We would like to be able to make our task pane wider.  The default width for a task pane on the web clients is pretty small.  Being able to set some sort of default width, or min width would be nice.  Perhaps an optional parameter on the showAsTaskPane() function?

Occasional Visitor

Hi Tim, thanks for the comment. I believe all office except Outlook has additional controls using that function showAsTaskPane(). It would be fantastic if all office apps had this function and could do as both Tim and I require. I liked Tim's approach to use this function.

Occasional Visitor

At my company we publish an Excel VSTO add-in and we would really like to switch to the new JS API. However, not being able to change the taskpane width is a major dealbreaker for us because we need to show a pdf viewer in the taskpane. The default width is not suitable for viewing pdf files. Any update on whether this will be implemented in the future?