Results 1 to 4 of 4
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Vancouver, Br. Columbia, Canada
    Posts
    632
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Launch Add-in from VBA (97)

    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.
    --------------------------------------------------
    Jack MacDonald
    Vancouver, Canada

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Launch Add-in from VBA (97)

    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?
    Charlotte

  3. #3
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Vancouver, Br. Columbia, Canada
    Posts
    632
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Launch Add-in from VBA (97)

    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.0Access Menu Add-InsOutlook form for LODM Auto Update]
    "Expression"="=OpenOutlookForm()"
    "Library"="I:LODM@ExcelFilesTankDipsProcessLODMAut oUpdate.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.
    --------------------------------------------------
    Jack MacDonald
    Vancouver, Canada

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Launch Add-in from VBA (97)

    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.
    Charlotte

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •