Tools, customize

D

dz

Is there a way to programmically set any of the options in
the Tools, customize, options dialog box?
 
S

Stephanie Krieger

Sure there is ... any of them ... you'll find most of the
options you'd look for as properties of the CommandBars
collection object and can find a lot of info through the
VBA help available for that object ... For example --
here's one direct code example in those help articles
that sets three properties from the Options tab of Tools,
Customize ...

With CommandBars
.LargeButtons = False
.DisplayFonts = False
.AdaptiveMenus = False
End With

You can also customize any commandbar programmatically
through that object. Use the CustomizationContext
property to indicate which template to save your changes
to.

If you don't know how to programmatically create a
command bar, there's a ton of good content and sample
code on the subject available in the MSDN library ...
start with this article -- you'll see links to several
others within it (the link here is on Office XP, but also
applies to 2003):

http://msdn.microsoft.com/library/default.asp?
url=/library/en-
us/modcore/html/deovrCreatingCommandBar.asp

Note that, if you're looking for custom button faces, you
can search for the Excel file download FaceID.xls at MSDN
as well ... it was originally created for Office 97, but
applies to the newer versions and is such a great little
tool for finding the corresponding numbers to
programatically create the icons you want for custom
toolbar buttons.)

Hope that's all helpful.

Stephanie Krieger
author of Microsoft Office Document Designer
email: MODD_2003 at msn dot com
blog: arouet.net
 
S

Stephanie Krieger

Actually, Application.Options controls Tools, Options
commands. Tools, Customize was the request --
Application.CommandBars is the place to go for that--
please see sample code and xrefs in my post above.

Stephanie
 
D

dz

Thanks, guys - thanks for your responses. I guess I
wasn't very clear. What I'm really trying to do is the
following:

1. Make sure that the Show standard and formatting
toolbars box is checked.
2. Arrange the existing toolbars so that they are flush
left at 0 and in proper order.
3. Force the Adobe PDF shortie toolbar to dock/append to
the right-hand side of the Formatting toolbar.

The only way I've been able to accomplish this is anything
but eloquent:

1. If the Rowindex for the show standard and formatting
toolbars is the same, then the show standard option box is
unchechecked. I then go into Tools, Customize, Options
through the built-in dialogs and select the option box
with Sendkeys, then use Sendkeys to tab down to the close
button of the dialog.
2. To arrange the existing toolbars, I have to close each
one and then reopen in the order that I want them stacked.
3. I have no idea how to get the Adobe PDF toolbar to
behave itself without user intervention.

Maybe I just have to punt and deal with the non-pretty way
of doing it?

Thanks.
 
S

Stephanie Krieger

oops ... clicked on the wrong one to point you to my
response. I posted answers for you in your separate post
below.

Stephanie
 

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