Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Sep 2004
    Location
    Sydney, New South Wales, Australia
    Posts
    50
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Using a subroutine in an Add-in (Word 2000 sp3)

    I have created an Add-in that is loaded when a specific document is opened. The Add-in has a number of modules that have subroutines that are activated by buttons on a toolbar. This all works OK.

    My question is, can I call one of the subroutines in the Add-in from another document created from its own template file after the Add-in is loaded? if so how?

    Thanks

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Using a subroutine in an Add-in (Word 2000 sp3)

    Yes, using Application.Run. Say that you have a procedure MyProc in a module in the add-in. You can call it like this:

    Application.Run "MyProc"

    If the procedure has one or more arguments, specify them after the name of the procedure, separated by commas:

    Application.Run "MyProc", 37, "Jones"

  3. #3
    Star Lounger
    Join Date
    Sep 2004
    Location
    Sydney, New South Wales, Australia
    Posts
    50
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Using a subroutine in an Add-in (Word 2000 sp3)

    Thanks Hans

    Regards

Posting Permissions

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