How to select a setting in a toolbar programmatically

G

Gary

Can someone show me the VBA code to Select a toolbar called "INK" and the
selection in that toolbar the 9th from the left side??

I believe the index starts from the left to right. Starting from 0.

It turns out, its "Ink Thickness" and I there will be some thickness to
select.


How do I select all of the programmatically in VBA ???

Thank You,

Gary
 
J

Jack Leach

With a reference enabled to Microsoft Office X.0 Object Library (X.0 being
your version number), you should be able to utilize the
Application.CommandBars(item) collection, which I *believe* will give you
access to programmatically manipulate all commands bars and toolbars in the
project. As for actually selecting it, I'm not sure, but there is probably
another way around.

Keep in mind that menubars and toolbars are in essance only a collection of
shortcuts to functions or properties within the project. So if you need to
change the Ink property on a toolbar, I would look for the property that this
particular toolbar is related to and change that property via code, rather
than trying to emulate a user clicking on certain command bar or toolbar
buttons.

hth
--
Jack Leach
www.tristatemachine.com

"I haven't failed, I've found ten thousand ways that don't work."
-Thomas Edison (1847-1931)
 

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