cascading menu

T

Thurlowe

I am making a dll for word using VB.
I get how to create a Button and the On Action event with the mybutton_click
to get an action to work .
What I dont get is, How do I make a cascading Menu with three options and
have the OnAction trigger a function or sub in the addin.
Does someone have a small sample of how to do this?
I would be forever greatfull.
 
K

Ken Slovak - [MVP - Outlook]

Use a CommandBarPopup control for the new menu and add your buttons to that
control.
 
T

Thurlowe

Kim I appreciate the advice. Been there ,done that.
I can crete a popup menu to appear in my Word app, but i have no action on
the click events. I need to click on one of the sub menus I created and have
it run a sub in the dll I created.

I added a popup, and then a button but i just am not getting something .
 
T

Thurlowe

Ken, I got it
It was a matter of defining the buttons as a different with events and name.
Da on me.
Thanks for your help
We all would be gas station attendants with out you MVP's
 
K

Ken Slovak - [MVP - Outlook]

Good, I'm glad it's working now.

One other thing to note is to always use a unique Tag property value when
you create a new button. That especially applies with multiple documents in
Word or multiple Inspectors in Outlook. If not then 1 button click will fire
in every instance of that button anywhere in the application.

I usually use a unique string value and then append a running counter
variable to that for a unique Tag. You could also use something like the
Win32 API call CoCreateGUID to create a unique Tag for every button you add.
 

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