macro buttons

S

strach

In Outlook 2003 I used to add buttons for my macros to the bar of the
message window. Those macros handle moving current message to certain
folders (default Move to Folder button was not convenient enough). Once
upgraded to version 2007, my buttons are now moved to Add-Ins menu of the
Ribbon and I'm fine with it (although they're one click further now to
reach). How do I add more macro buttons to the Add-Ins? I only found a way
to add them to Quick Access Toolbar which is not feasible since the captions
appear there only when mouse is over, and I need them displayed permanently.
Thanks in advance.
 
S

Sue Mosher [MVP]

You still can access your custom toolbar by name with VBA. For example, if I
have a custom toolbar named "Test," this code will add a new command on the
Add-ins tab tp run a macro named "macro_name":

Dim cb As CommandBar
Dim cbb As CommandBarButton
Set insp = Application.ActiveInspector
Set cb = insp.CommandBars("Test")
cb.Visible = True
Set cbb = cb.Controls.Add(msoControlButton)
cbb.Caption = "My Macro"
cbb.OnAction = "macro_name"I can add a new button to run the

'FYI, there is a newsgroup specifically for general Outlook programming
issues "down the hall" at microsoft.public.outlook.program_vba or, via web
interface, at
http://www.microsoft.com/office/community/en-us/default.mspx?dg=microsoft.public.outlook.program_vba
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top