locked
dynamic add com add-ins in office RRS feed

  • Question

  • I want to dynamic add a com add-ins in office.

    eg:

    I had a com add -in , the name is "c:\office.dll"

    if I open a word file,  select file->options->add-ins->com add-ins->add. select  c:\office.dll. the com add-in will be added now.

    my question is :

      I want to use code to add the "c:\office.dll"  in word like it, how can I do it?

    thanks any help

     
    • Moved by Max Meng Wednesday, September 5, 2012 5:44 AM moving to a more appropriate forum (From:Office 2010 Setup and Deployment)
    Tuesday, September 4, 2012 12:08 PM

Answers

  • Hi,

    As far as I know, this COMAddIn.Connect Property may be you are looking for. I think you can use  Application.COMAddIns.Item(ref index).Connect = Ture/False to load/upload a COM Add-in. Please have a try.

    Hope it helps.

    Best Regards,


    Leo_Gao [MSFT]
    MSDN Community Support | Feedback to us

    • Marked as answer by Leo_Gao Tuesday, September 11, 2012 6:57 AM
    Thursday, September 6, 2012 3:06 AM

All replies

  • I had get the COMAddIns interface, but I can not get useful way.

    Tuesday, September 4, 2012 12:11 PM
  • Hi xiaofeichong,

    Thanks for posting in the MSDN Forum.

    Based on your issue, I would recommend you this thread has the similar problem with you.

    http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/fb93cd2a-b16f-4aa0-8e6f-dca1f3969091

    It directs some ideas and related links of how to load an Add-in dynamically and I think you will get it working to resolve the issue with its assistance.

    If I misunderstand you or anything is unclear, please feel free to let me know.

    Best Regards,


    Leo_Gao [MSFT]
    MSDN Community Support | Feedback to us

    Wednesday, September 5, 2012 6:02 AM
  • Hi leo_Gao:

      thanks for you reply.

       I met the problem :

        I had called "regsvr32"  command to add  com add-in, but the  com add-in can not add immediately when the word file had been opened. it will be added when the word file had been closed and open the word again.

       I had tested, if  I  select file->options->add-ins->com add-ins->add.  select  c:\office.dll,

    the com add-in will be added immediately.

       so  I  want to do it like this using code.

       the COMAddIns  interface had not offer add function to add com-add in.

       my question is ::  Is office had offered the interface to do add the com add in.

    thanks

    chadd

      

     

      

    Wednesday, September 5, 2012 7:48 AM
  • you must connect again

    Wednesday, September 5, 2012 8:37 AM
  • Hi,

    As far as I know, this COMAddIn.Connect Property may be you are looking for. I think you can use  Application.COMAddIns.Item(ref index).Connect = Ture/False to load/upload a COM Add-in. Please have a try.

    Hope it helps.

    Best Regards,


    Leo_Gao [MSFT]
    MSDN Community Support | Feedback to us

    • Marked as answer by Leo_Gao Tuesday, September 11, 2012 6:57 AM
    Thursday, September 6, 2012 3:06 AM