Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / November 2004

Tip: Looking for answers? Try searching our database.

VBA to remove toolbar and menu choices

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
keith brickey - 10 Nov 2004 17:09 GMT
How can I use VBA to remove toolbar and menu choices for a particular
document?

Thanks,

Keith
Jonathan West - 10 Nov 2004 18:50 GMT
> How can I use VBA to remove toolbar and menu choices for a particular
> document?

Before attempting to answer in detail, can I ask why you want to do this -
what you are trying to achieve overall?

Signature

Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup

keith brickey - 10 Nov 2004 19:18 GMT
I want to eliminate the number, bullet, and indent/outdent buttons and their
associated menu items. the reason is to eliminate dealing with Word numbered
list bugs that seem to be made worse by the use of these features. I have
written some VBA functions that accomplish the same thing without the bugs.

Thanks,

Keith

> > How can I use VBA to remove toolbar and menu choices for a particular
> > document?
>
> Before attempting to answer in detail, can I ask why you want to do this -
> what you are trying to achieve overall?
Jonathan West - 10 Nov 2004 19:56 GMT
>I want to eliminate the number, bullet, and indent/outdent buttons and
>their
[quoted text clipped - 3 lines]
> written some VBA functions that accomplish the same thing without the
> bugs.

You don't need VBA for this. Create a custom template for your documents.
Then, with the template open, go to Tools Customize. In the Customize dialog
that appears, set it so that changes will be saved in your template rather
than in normal.dot, and then click any button you want to get rid of and
drag it off the toolbar.

Signature

Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup

Keith Brickey - 10 Nov 2004 23:35 GMT
I have custom template now that I use to create a new document. The problem
is the the document gets distributed throughout a large community of users,
and many who edit it do not have the template. (Another factor may be that
not all users have the same version of Word.)
I end up with documents containing a lot of "bastardized" styles created by
Word, such as "Stylename CHAR CHAR CHAR CHAR" and these cause confusion
among the users of the document. My idea is, as much as possible, to
programmatically remove styles that are not in the template and strip out as
much as possible, the Word functionality that causes these problems,
replacing that functionality with simple VBA routines known to work
reliably.

> >I want to eliminate the number, bullet, and indent/outdent buttons and
> >their
[quoted text clipped - 9 lines]
> than in normal.dot, and then click any button you want to get rid of and
> drag it off the toolbar.
Jonathan West - 10 Nov 2004 23:43 GMT
>I have custom template now that I use to create a new document. The problem
> is the the document gets distributed throughout a large community of
[quoted text clipped - 10 lines]
> replacing that functionality with simple VBA routines known to work
> reliably.

Toolbars don't get saved with documents. VBA code *can* be saved in a
document rather than a template, but VBA code in a document simply will not
run if the user is on Word 2000 or later and has macro security set to high,
unless the code is digially signed and the user chooses to accept the
digital signature. If they are working in Word 97 or Word 2000, any edit of
the document will break the digital signature.

Therefore, you need to distribute the template and encourage your users to
use it. This article may give you some ideas in that direction.

Creating Custom Toolbars for Templates
http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=262

Signature

Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.