• Launch Add-in from VBA (97)

    Author
    Topic
    #393392

    Once an Add-in is properly registered and functioning from the Tools > Add-ins menu, can it be launched using just VBA? If so, what is the syntax?

    I found this statement in the Help file: “There’s no RunCommand action setting that corresponds to the Add-ins command.”, which doesn’t bode well… I would like to run the Add-in from the click event of a command button on a form.

    Thx.

    Viewing 1 reply thread
    Author
    Replies
    • #713177

      I suspect it depends on how the Add-In is set up. What kind of an add-in is this and what kind of programming interface does it offer?

      • #713377

        It is a simple Access MDB file that contains a single form. I installed it in the Add-in menu by adding a new key in the registry. Here is an export of the registry:

        REGEDIT4

        [HKEY_LOCAL_MACHINESoftwareMicrosoftOffice8.0AccessMenu Add-InsOutlook form for LODM Auto Update]
        “Expression”=”=OpenOutlookForm()”
        “Library”=”I:LODM@ExcelFilesTankDipsProcessLODMAutoUpdate.mdb”

        The issue I was experimenting with is how to supply some optional Outlook functionality to my application without including a Reference to the Outlook object model. I wanted to avoid managing the References because the application is loaded on various computers which may or may not have Outlook installed, or which may have different Outlook versions. As an experiment, I found that I could make a separate MDB file that *did* reference the Outlook model, and open a form in this separate MDB file via the Add-in menu. By using this method on a computer without Outlook, I could simply not install the Add-in, thus avoiding the failure that would happen if the Reference to the Outlook object model was invalid.

        The idea works and the form can be opened by using the Add-in menu. I wanted to take it the next step, and open the form directly from a command button.

        Another way to accomplish the same result would be to Reference the MDB file, but that still leaves me with having to manage the References.

        • #713644

          We handled a similar issue by putting the reference to CDO in an Access database and then referencing that database in our main application. If the reference broke in the code library database, it didn’t mess up our main application. I assumed you were talking about a regular add-in, which for an Access mda file would include a USysRegInfo table.

        • #713645

          We handled a similar issue by putting the reference to CDO in an Access database and then referencing that database in our main application. If the reference broke in the code library database, it didn’t mess up our main application. I assumed you were talking about a regular add-in, which for an Access mda file would include a USysRegInfo table.

      • #713378

        It is a simple Access MDB file that contains a single form. I installed it in the Add-in menu by adding a new key in the registry. Here is an export of the registry:

        REGEDIT4

        [HKEY_LOCAL_MACHINESoftwareMicrosoftOffice8.0AccessMenu Add-InsOutlook form for LODM Auto Update]
        “Expression”=”=OpenOutlookForm()”
        “Library”=”I:LODM@ExcelFilesTankDipsProcessLODMAutoUpdate.mdb”

        The issue I was experimenting with is how to supply some optional Outlook functionality to my application without including a Reference to the Outlook object model. I wanted to avoid managing the References because the application is loaded on various computers which may or may not have Outlook installed, or which may have different Outlook versions. As an experiment, I found that I could make a separate MDB file that *did* reference the Outlook model, and open a form in this separate MDB file via the Add-in menu. By using this method on a computer without Outlook, I could simply not install the Add-in, thus avoiding the failure that would happen if the Reference to the Outlook object model was invalid.

        The idea works and the form can be opened by using the Add-in menu. I wanted to take it the next step, and open the form directly from a command button.

        Another way to accomplish the same result would be to Reference the MDB file, but that still leaves me with having to manage the References.

    • #713178

      I suspect it depends on how the Add-In is set up. What kind of an add-in is this and what kind of programming interface does it offer?

    Viewing 1 reply thread
    Reply To: Launch Add-in from VBA (97)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: