+ Reply to Thread
Results 1 to 13 of 13

Thread: Invoking an Application Addin using VB

  1. #1
    Registered User
    Join Date
    03-30-2010
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    9

    Invoking an Application Addin using VB

    Hi all,

    I'm running Excel 2007 and have the DYMO Labelwriter application add-in installed.

    Instead of having to use the button in the add-ins menu ribbon to invoke the DYMO add-in, I'd like to create a command button placed within a worksheet that does the same job.

    Does anyone know the VB code I will need to place within a button to do this?

    Thanks
    Last edited by graemep; 04-13-2010 at 05:38 AM.

  2. #2
    Forum Moderator Richard Buttrey's Avatar
    Join Date
    02-15-2008
    Location
    Grappenhall, UK
    MS-Off Ver
    Excel for Windows & Mac - all versions.
    Posts
    6,566

    Re: Invoking an Application Addin using VB

    Hi,

    Just identify the procedure name used in the Dymo add in, then right click on the button, pick 'assign macro' and enter that name as the macro to run.

    HTH
    Richard Buttrey

    If this was useful then please rate it appropriately.

    Click the small star icon at the bottom left of my post.

  3. #3
    Registered User
    Join Date
    03-30-2010
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Invoking an Application Addin using VB

    I'm not sure how to identify the procedure name, the only info I can see about the add-in is through Excel Options -> Add-ins, where it shows me the location of the addins .dll and tells me that it is a COM Add-in.

    Thanks

  4. #4
    Forum Moderator Richard Buttrey's Avatar
    Join Date
    02-15-2008
    Location
    Grappenhall, UK
    MS-Off Ver
    Excel for Windows & Mac - all versions.
    Posts
    6,566

    Re: Invoking an Application Addin using VB

    Hi,

    The other problem you may have is that the Add In may be protected by a password. Go to the Excel options as you have done, click the 'Go' button at the bottom and select the Dymo Add In.

    Now OK out and go to the Visual Basic Environment with F11. The Add in should be displayed in the Project Explorer window on the left. Click the '+' drop down arrow to see if it opens any code on the roght. You may get a password prompt.

    If you do, probably the only thing you can do is email Dymo and ask them if you can have the password.

    Regards
    Richard Buttrey

    If this was useful then please rate it appropriately.

    Click the small star icon at the bottom left of my post.

  5. #5
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    Apparently I can't say
    MS-Off Ver
    Apparently I can't say
    Posts
    8,274

    Re: Invoking an Application Addin using VB

    Have you ever had it installed on 2003 or earlier? Which version of the DYMO software do you have?

  6. #6
    Registered User
    Join Date
    03-30-2010
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Invoking an Application Addin using VB

    Hi, the addin doesn't appear in the project explorer window and have also tried Alt F11 whilst the addin is running but it won't go into the VB screens. Will contact Dymo for their input and post back if they come up with a solution.

    Thanks for your help Richard.

  7. #7
    Registered User
    Join Date
    03-30-2010
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Invoking an Application Addin using VB

    Have only ever had Excel 2007 installed on my machine. Am using the latest DYMO software v8.2.0.794, model is a labelwriter450.

    Thanks

  8. #8
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    Apparently I can't say
    MS-Off Ver
    Apparently I can't say
    Posts
    8,274

    Re: Invoking an Application Addin using VB

    It appears to be a free download (albeit a large one) so if I get time, I'll have a play with it. It should be possible to simply execute the relevant commandbutton, but finding the right control may take a little work.

  9. #9
    Registered User
    Join Date
    03-30-2010
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Invoking an Application Addin using VB

    Update:

    Dymo support said it was beyond them and suggested I look at the SDK for a possible solution (http://www.labelwriter.com/software/..._Installer.exe). I don't understand the contents of the SDK myself, but someone else may be able to make sense of it?

    Also, have been able to examine the contents of the add-ins dll file, DymoExcelAddin.dll. It lists the following function names, DllCanUnloadNow, DllGetClassObject, DllRegisterServer, DllUnregisterServer.
    Could these functions be run from excel somehow to invoke the add-in?

  10. #10
    Registered User
    Join Date
    03-30-2010
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Invoking an Application Addin using VB

    Have had word from DYMO developer support and they say that what I'm trying to do cannot be done.

  11. #11
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    Apparently I can't say
    MS-Off Ver
    Apparently I can't say
    Posts
    8,274

    Re: Invoking an Application Addin using VB

    Are you literally just trying to do the equivalent in code of clicking a menu item? If so, that should definitely be possible.

  12. #12
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    Apparently I can't say
    MS-Off Ver
    Apparently I can't say
    Posts
    8,274

    Re: Invoking an Application Addin using VB

    Try this:
    application.CommandBars("Standard").Controls("Print Label").execute

  13. #13
    Registered User
    Join Date
    03-30-2010
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Invoking an Application Addin using VB

    Thats works great!!

    Thanks very much!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.2.0