none
launch app for office from a VSTO addin RRS feed

  • Question

  • Hello,

    Is there a way to launch an app for office from a vsto addin?

    I have found that I can include the app gallery to my ribbon using:

    <gallery idQ="OfficeExtensionsGallery2" label="label" visible="true" />
    

    and I can launch a featured app using

    <button idQ="OfficeExtensionsFeaturedApp1" label="Featured App 1" />

     However this is not really good enough... I need to launch a specific app. Any ideas?

    Tuesday, August 18, 2015 1:29 PM

All replies

  • VSTO doesn't provide anything for that.

    If you develop a Mail App it will be activated automatically in the specified context. But there is no way to run a specific App programmatically.

    Tuesday, August 18, 2015 1:33 PM
  • Alternatively is there a way to host an app for office within a custom taskpane of a VSTO addin?
    Tuesday, August 18, 2015 1:38 PM
  • No, there is no way to access one from another - web based addins cannot access COM object model and COM addins cannot access web apps.

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Tuesday, August 18, 2015 4:12 PM
  • Alternatively is there a way to host an app for office within a custom taskpane of a VSTO addin?

    No. I think about all you can do is give the user instructions on how to load the app from the Ribbon. It's important to note that the app will be specific to and stored in the active document.

    Cindy Meister, VSTO/Word MVP, my blog

    Tuesday, August 18, 2015 4:23 PM
    Moderator
  • I was thinking of using a WebBrowser and ObjectForScripting to provide methods such as window.external.GetContext() to the javascript app... Are there any obvious reasons that make this approach floored?

    Thursday, August 20, 2015 11:50 AM
  • Maybe another possibility is to create interops for OSF.dll and somehow create an instance of OsfAxControl?

    Thursday, August 20, 2015 3:32 PM
  • You would then need to replicate all the functionality exposed to the web addins by the host app.

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Thursday, August 20, 2015 3:57 PM
  • Not quite all... Only the parts used by the Office web app.

    Anyhow, I don't seem to be able to get this working... GetContext() is not being called by the office javascript. Not sure why. 

    Thursday, August 20, 2015 4:10 PM