'Outlook add-in how to open email in separate window in read mode?

Even more questions from my side. I need to open email in new window in Outlook(desktop and online). I know that email id, and I also know that method Office.context.mailbox.displayMessageFormAsync() will open it if I pass to it messageID, but problem is it opens it in "edit" mode, user can edit msg as it wants.

Question is How to open outlook email in new window in read only mode ? Maybe need to add some kind of option to method?



Solution 1:[1]

Greetings I found the answer(?). By some means this is not written in MS docs. That there are two methods who looks familiar, one is async second is not, but how they opening emails are different.

If you use displayMessageForm() method it will open email in readme mode like this. email opened in readme form

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Nyuokimi