none
How to distribute and install an Excel addin? RRS feed

  • Question

  •  

    I need to allow my Windows Forms application to run an Excel VBA function.

    In the debug environment it works: I install (if it is not yet installed) the addin like this:

     

    Dim AddInFileName As String = My.Application.Info.DirectoryPath & "MyAddin.xla"
    Dim AddIn As Microsoft.Office.Interop.Excel.AddIn = Excel.AddIns.Add(AddInFileName, False)
    AddIn.Installed = True
    

    And I run the function like this:

     

    Excel.Run("MyAddin.xla!Parser", MacroName, CmdArguments)
    
    

    Is this the correct way to install an Excel addin?

    Is My.Application.Info.DirectoryPath the correct folder to distribute MyAddin.xla?

    How do I tell ClickOnce to put the addin in My.Application.Info.DirectoryPath?

    Thanks,
    Stefano

     

    • Moved by Jie BaoModerator Thursday, February 3, 2011 9:39 AM (From:ClickOnce and Setup & Deployment Projects)
    Wednesday, February 2, 2011 1:48 AM

Answers

All replies