Calling a private sub in Outlook via toolbar button

  • Thread starter Thread starter butterfly
  • Start date Start date
B

butterfly

I need to add a button to my outlook toolbar called "send and file".
This button needs to call a subroutine that will send the message and
allow a user to choose a folder to save the message to (other than the
sent items). My subroutine is working correctly. However, I am unable
to link it to the toolbar because it is a private subroutine. How can
I trigger a private subroutine from a toolbar button?

Thanks very much for your help!
 
Am 26 Jun 2006 13:55:50 -0700 schrieb butterfly:

You can´t link it to the button. Why don´t you declare the subroutine as
public?

Another way is to use a variable as Office.CommandButton, declared
WithEvents. From that Click event you can call private methods in that
module.
 
Back
Top