2

I would like to add a button on my page to programmatically via JS to open the Outlook Add-In and load a specific Add-In. Is that possible? Any tips, directions or examples would be greatly appreciated.

PS This is for an onpremises Exchange server, so I have a way to put a button on the new message page, that's not the challenge. The qustion is about opening the Add-in through JavaScript\Typescript.

PHenry
  • 287
  • 3
  • 16
  • Javascript through a browser can't even save files to the hard drive without permission so I doubt you'll be able execute code to open up another executable...so your javascript basically has to tell the user to download this executable which then they run to open your outlook and addin. – Cody G Jan 26 '17 at 17:43
  • Thank you Cody for the reply. I apologize, I think I might have misled people. I'm running this with OWA, Outlook Web Access. I have access to the Exchange server and can change the backend files to change the Send button JS. I want to know if anyone's written JS, from a button to open up the OWA Add-Ins and selected one of the add-ins to open the task pane on the right hand side. – PHenry Jan 26 '17 at 19:08
  • Add the OWA tag to your question (although there aren't too many of those!) – Cody G Jan 26 '17 at 19:16
  • Thanks Cody, I just added it. – PHenry Jan 26 '17 at 19:21

2 Answers2

2

I would like to add a button on my page to programmatically via JS to open the Outlook Add-In and load a specific Add-In. Is that possible?

No, it is not.

Any tips, directions or examples would be greatly appreciated

What you are trying to do is available for add-in developers and called Add-in commands for Outlook. No need to hack in into backend of your Exchange environment. If provider of specific add-in add this capability, the button will appear in the ribbon of Outlook Desktop and under compose message aria of Outlook for Web, by clicking on which the add-in will be invoked and user would see add-in window.

Slava Ivanov
  • 6,666
  • 2
  • 23
  • 34
  • Thank you Slava for your comments. Unfortunately when I tried the add-in commands they didn't act anything like we expected. In fact, they behaved three different ways. In Outlook (thick client) there were buttons up on the toolbar (great! but not what we care about). The "Old" Outlook Online UX (bigger Add-Ins menu option brings up big add-ins buttons on the far right side) wouldn't show them at all, and the "New" UX (all add-ins listed in small buttons on bottom right) had one small button down there without any toolbar options. Is there another example maybe I can try again? – PHenry Jan 26 '17 at 22:33
  • Hi Slava, I actually used that very same example, and unfortunately did not get any type of toolbar icons while using the OWA\web UI. That is what we're looking for, like the thick client. Maybe I'm missing something? – PHenry Jan 26 '17 at 22:36
  • Hello Henry, What you have described in the comment is the maximum you can get, indeed. Outlook for web would display app's icon under compose window and even more if there are more than 5 add-ins installed your add-in may be in the drop-down list, depend on installation order. The old OWA interface is even worth and doesn't support commands add-ins. I clearly understand what you are trying to achieve, but by using Office.js API you cannot do that. Basically, you are trying to ask now how to "hack" add-in invocation. Probably nobody would tell you that. – Slava Ivanov Jan 27 '17 at 14:15
  • Thank you Slava for replying. And thank you for confirming my previous comments\findings. So unfortunately, at this time, the commands are not helpful\useful at this time. We did figure out a way to "hack" the OWA Exchange install to "inject" our JS to launch our add-in programatically and call our own buttons. Not pretty but it does work. Thanks for your replies. – PHenry Jan 30 '17 at 18:42
  • For on premises Exchange, you have to make sure you have Exchange 2016 and latest CU deployed. That supports commands feature. In that case, you'll see buttons next to reply button in read, while in compose they will be in the bottom right. i don't recommend doing any hacks - as we evolve the client, that will likely break and is not supported. – AndrewS Feb 24 '17 at 21:33
  • Ah yes, I do see the buttons on the bottom right hand side. Unfortunately they are not "as advertised" and not up on the menu bar where a user would expect to see "those types of buttons." Also, in thick client Outlook, there are buttons up on the ribbon bar...where I was expecting to see them on the web. I understand there are technical issues to why\how they are different. But from a user's vantage point, the "web" way being different is not really a usable "feature" for us. Sorry. – PHenry Feb 27 '17 at 15:45
0

There is a way to do this, but so as to not ruffle too many feathers at Microsoft, I'll just talk about it general. The key is you HAVE to have access to the Exchange box and edit the microsoft.owa.mail.compose.js.xml file. It's obfuscated, so you'll have to do a bit more research, but it can be done.

PHenry
  • 287
  • 3
  • 16
  • Of cause there are always some ways to "hack" the software on your own box. We have similar "hack" solution that mess with UI and logic of OWA for ages, starting from Exchange 2003 and till 2013. After Microsoft make robust Office.js solution we moved right away. I was sick and tired to modify the code after every upgrade of Exchange, maintain several versions for different patches and with large amount of customers and patches it's quickly running out of control. Never Again ;) – Slava Ivanov Feb 24 '17 at 22:03