none
communcate VSTO ribbon and windows form by wcf RRS feed

  • Question

  • I'm New to wcf and vsto.what I want to achieve is this. I have a vsto addin ribbon which run on MS power point. I am trying to open PowerPoint by a windows application and this ribbon should display only in that scenario.(If I open PowerPoint along ,ribbon should not display) After seeking for a way I feel I could use wcf or .net remoting .which way is the best way or either both incorrect ? please advice me .

    Monday, June 24, 2013 3:38 AM

Answers

  • HI gayan

    If I'm correctly understanding your requirement, the best approach would probably be to install your add-in to NOT load automatically, but only on-demand. Your Windows App can then load and unload the add-in, as required. If you need even finer granularity, the application can also monitor events that open/close/create documents and/or when the user switches to a different document window.

    See the Connect property of the ComAddin object in the PowerPoint object model.


    Cindy Meister, VSTO/Word MVP, my blog

    Monday, June 24, 2013 9:47 AM
    Moderator
  • Hi Damian

    If the add-in is installed for all users, then it's not visible to the Addins collection, so can't be loaded/unloaded through the application API.

    But VSTO add-ins are actually designed to be installed to the HKCU; installing to the HKLM was a later concession to popular demand...


    Cindy Meister, VSTO/Word MVP, my blog

    Monday, June 24, 2013 3:27 PM
    Moderator

All replies

  • wcf is overkill and remoting is somewhat obsolete - maybe try to use pipes? http://msdn.microsoft.com/en-us/library/bb546102.aspx
    Monday, June 24, 2013 3:59 AM
  • HI gayan

    If I'm correctly understanding your requirement, the best approach would probably be to install your add-in to NOT load automatically, but only on-demand. Your Windows App can then load and unload the add-in, as required. If you need even finer granularity, the application can also monitor events that open/close/create documents and/or when the user switches to a different document window.

    See the Connect property of the ComAddin object in the PowerPoint object model.


    Cindy Meister, VSTO/Word MVP, my blog

    Monday, June 24, 2013 9:47 AM
    Moderator
  • Hi Cindy

    if add-in is installed for all users (hklm) then his app might not have rights to call Connect = true, or am i mistaken?

    Monday, June 24, 2013 12:04 PM
  • Hi Damian

    If the add-in is installed for all users, then it's not visible to the Addins collection, so can't be loaded/unloaded through the application API.

    But VSTO add-ins are actually designed to be installed to the HKCU; installing to the HKLM was a later concession to popular demand...


    Cindy Meister, VSTO/Word MVP, my blog

    Monday, June 24, 2013 3:27 PM
    Moderator