Reply
 
Thread Tools Display Modes
  #1   Report Post  
Robert Werner
 
Posts: n/a
Default Block/Disable Custom Toolbar Items

I am currently in the process of creating a new "clean" template and I have
set up a toolbar which will provide menus, for Paragraph and characters
styles, commonly used macros for formatting numbered lists and inserting
fileds, creating tables plus an assortment of other items.

I want to know how to display items in the toolbar, such as the style list
but disable it so you can't apply styles from it. I also want to know how to
disable other toolbars.

how can I do this?
  #2   Report Post  
Cindy M -WordMVP-
 
Posts: n/a
Default

Hi ?B?Um9iZXJ0IFdlcm5lcg==?=,

I want to know how to display items in the toolbar, such as the style list
but disable it so you can't apply styles from it. I also want to know how to
disable other toolbars.

It can only be done with a macro. the basic code is along these lines:

CommandBars("Formatting").Controls(1).Enabled = False

Before you execute a set of commands like this, however, you do need to tell
Word WHERE you want these changes to be stored. I don't imagine you want them
in all your documents? Just in documents created from this template? In that
case, run it with the focus in the template with
CustomizationContext=ActiveDocument

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)

  #3   Report Post  
Robert Werner
 
Posts: n/a
Default

Loooks, good, but i something here is missing. could you give me some more
directions.

I only have experience recording macros and copying macros with fine tune
modifications. I'd like to script macros properly. What book would you
recommend for learning how to script in visual basic?

"Cindy M -WordMVP-" wrote:

Hi ?B?Um9iZXJ0IFdlcm5lcg==?=,

I want to know how to display items in the toolbar, such as the style list
but disable it so you can't apply styles from it. I also want to know how to
disable other toolbars.

It can only be done with a macro. the basic code is along these lines:

CommandBars("Formatting").Controls(1).Enabled = False

Before you execute a set of commands like this, however, you do need to tell
Word WHERE you want these changes to be stored. I don't imagine you want them
in all your documents? Just in documents created from this template? In that
case, run it with the focus in the template with
CustomizationContext=ActiveDocument

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)


  #4   Report Post  
Suzanne S. Barnhill
 
Posts: n/a
Default

One place to start is
http://word.mvps.org/FAQs/MacrosVBA/...csIn15Mins.htm

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"Robert Werner" wrote in message
...
Loooks, good, but i something here is missing. could you give me some more
directions.

I only have experience recording macros and copying macros with fine tune
modifications. I'd like to script macros properly. What book would you
recommend for learning how to script in visual basic?

"Cindy M -WordMVP-" wrote:

Hi ?B?Um9iZXJ0IFdlcm5lcg==?=,

I want to know how to display items in the toolbar, such as the style

list
but disable it so you can't apply styles from it. I also want to know

how to
disable other toolbars.

It can only be done with a macro. the basic code is along these lines:

CommandBars("Formatting").Controls(1).Enabled = False

Before you execute a set of commands like this, however, you do need to

tell
Word WHERE you want these changes to be stored. I don't imagine you want

them
in all your documents? Just in documents created from this template? In

that
case, run it with the focus in the template with
CustomizationContext=ActiveDocument

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question

or reply
in the newsgroup and not by e-mail :-)



  #5   Report Post  
Cindy M -WordMVP-
 
Posts: n/a
Default

Hi ?B?Um9iZXJ0IFdlcm5lcg==?=,

Loooks, good, but i something here is missing. could you give me some more
directions.

Yes, but you have to give me some guidance where you're getting stuck. I do
suggest you "play" with the settings in a "throw-away" document, until things
are working predictably. This kind of thing can quickly ruin a document.

I only have experience recording macros and copying macros with fine tune
modifications. I'd like to script macros properly. What book would you
recommend for learning how to script in visual basic?

Besides what Suzanne recommended, for WORD VBA (Visual Basic is something
else, again), you might try to scare up the Word 97 Macro & VBA Handbook
(Sybex). It's not my favorite, but if you have no previous experience, it's
probably the best place to start.

Also, as you progress with Word VBA, and need further help, you should post
to the word.vba newsgroups.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)



  #6   Report Post  
Robert Werner
 
Posts: n/a
Default

Using the article Suzanne recommends to get started with the VBA editor and
your suggestion, I got a result with the following:

CustomizationContext = ActiveDocument
CommandBars("Formatting").Enabled = False
CommandBars("MyCustomToolbar").Enabled = True
CommandBars("MyCustomToolbar").Visible = True

I'll try the book you recommend.

Thanks to you both for your help

"Cindy M -WordMVP-" wrote:

Hi ?B?Um9iZXJ0IFdlcm5lcg==?=,

Loooks, good, but i something here is missing. could you give me some more
directions.

Yes, but you have to give me some guidance where you're getting stuck. I do
suggest you "play" with the settings in a "throw-away" document, until things
are working predictably. This kind of thing can quickly ruin a document.

I only have experience recording macros and copying macros with fine tune
modifications. I'd like to script macros properly. What book would you
recommend for learning how to script in visual basic?

Besides what Suzanne recommended, for WORD VBA (Visual Basic is something
else, again), you might try to scare up the Word 97 Macro & VBA Handbook
(Sybex). It's not my favorite, but if you have no previous experience, it's
probably the best place to start.

Also, as you progress with Word VBA, and need further help, you should post
to the word.vba newsgroups.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)


  #7   Report Post  
Robert Werner
 
Posts: n/a
Default

This macro work well but only when you run it. I would like to ensure that
uit runs automatically.

CustomizationContext = ActiveDocument
CommandBars("Formatting").Enabled = False
CommandBars("AppSense").Enabled = True
CommandBars("AppSense").Visible = True

I had thoight that it did work automatically but i have since noticed that
it doesn't

Any suggestions?

"Robert Werner" wrote:

Using the article Suzanne recommends to get started with the VBA editor and
your suggestion, I got a result with the following:

CustomizationContext = ActiveDocument
CommandBars("Formatting").Enabled = False
CommandBars("MyCustomToolbar").Enabled = True
CommandBars("MyCustomToolbar").Visible = True

I'll try the book you recommend.

Thanks to you both for your help

"Cindy M -WordMVP-" wrote:

Hi ?B?Um9iZXJ0IFdlcm5lcg==?=,

Loooks, good, but i something here is missing. could you give me some more
directions.

Yes, but you have to give me some guidance where you're getting stuck. I do
suggest you "play" with the settings in a "throw-away" document, until things
are working predictably. This kind of thing can quickly ruin a document.

I only have experience recording macros and copying macros with fine tune
modifications. I'd like to script macros properly. What book would you
recommend for learning how to script in visual basic?

Besides what Suzanne recommended, for WORD VBA (Visual Basic is something
else, again), you might try to scare up the Word 97 Macro & VBA Handbook
(Sybex). It's not my favorite, but if you have no previous experience, it's
probably the best place to start.

Also, as you progress with Word VBA, and need further help, you should post
to the word.vba newsgroups.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)


Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
icon on custom toolbar don't work Kimmie B Microsoft Word Help 1 June 4th 05 02:05 AM
How do I create a drop-down list for a custom toolbar in Word? P Williams Microsoft Word Help 1 May 26th 05 10:39 AM
expanding custom dictionary [email protected] Microsoft Word Help 2 May 24th 05 10:21 PM
Custom Toolbar mommahinc Microsoft Word Help 6 January 21st 05 02:58 PM
custom toolbar turns off Lesa Microsoft Word Help 1 December 16th 04 04:16 AM


All times are GMT +1. The time now is 10:44 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"