none
customizing office application level add-in RRS feed

  • Question

  • hii,,

    I've a office application level add-in developed in vs2008.

    But it is loaded by all the word instances once it is installed. I want to load it for particular instance of the word.

    I've a C# application from which i'm instantiating the word application. I want the add-in to be applicable only this instance of the word.

    How is it possible?

    • Moved by Mike Feng Thursday, February 7, 2013 10:32 AM
    Wednesday, February 6, 2013 8:54 AM

Answers

  • Hi "avengers"

    By definition and by default, an application-level add-in is available "all the time".

    You can restrict it by:

    1. install it to load "on demand" instead of automatically (which is the default)
    2. Put code in your C# application to load and unload it.

    • This requires using the WordApplication.ComAddins collection's .Item[index].Connect property. Set it to "True" to load and "False" to unload it. [Index] would be the ProgId of the Addin (basically, the name you give it).
      Word picks up Add-ins from the Registry and is aware of all correctly registered add-ins, even if they aren't automatically loaded. Connect takes care of loading/unloading registered add-ins of which Word is aware.

    Cindy Meister, VSTO/Word MVP, my blog

    Thursday, February 7, 2013 4:46 PM
    Moderator

All replies

  • Hi Aveng,

    Welcome to the MSDN Forum.

    I have moved this thread to Word forum for more responses.

    Thank you.

    Best regards,


    Mike Feng
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, February 7, 2013 10:33 AM
  • Hi "avengers"

    By definition and by default, an application-level add-in is available "all the time".

    You can restrict it by:

    1. install it to load "on demand" instead of automatically (which is the default)
    2. Put code in your C# application to load and unload it.

    • This requires using the WordApplication.ComAddins collection's .Item[index].Connect property. Set it to "True" to load and "False" to unload it. [Index] would be the ProgId of the Addin (basically, the name you give it).
      Word picks up Add-ins from the Registry and is aware of all correctly registered add-ins, even if they aren't automatically loaded. Connect takes care of loading/unloading registered add-ins of which Word is aware.

    Cindy Meister, VSTO/Word MVP, my blog

    Thursday, February 7, 2013 4:46 PM
    Moderator