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 / Menus and Toolbars / March 2007

Tip: Looking for answers? Try searching our database.

Templates and Custom Menus

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
td - 28 Mar 2007 01:22 GMT
I have a set of Word Macros that I want to run from a custom menu.  I want to
be able to have these menus (and submenus) show up for a set of Word
documents that I keep in a certain folder.  In other words, my menu would
show "File, Edit, View, Insert, Tools, Window, Help, Topics," where Topics is
my custom menu.

I tried this some time ago in a similar set of Word code, and ran into a
problem.  Unfortunately I don't have that code available to tell you exactly
what I was doing, but I'll explain the general problem.  Also, I know just
enough VBA to be dangerous.  Unfortunately, I have to get certain things
done, so I end up having to dabble.  So please forgive any ignorance I show.

First, a bit of what I remember about how the code was set up.  There was a
subroutine called CreateMenu, in which we had code to generate the menu and
submenus, and to link those submenus to various macros.  If I remember
correctly, we ran this subroutine at the start of the project, and it created
the menus, and then we just attached that template to each file in the folder
that we wanted to use those menus and macros with.  Things worked perfectly,
and we were able to use those macros for the rest of the project.  All team
members saw the menu, and had no problems using the menu.

On the second project, things got a little hairy.  I went in and changed the
code to show the new categories and macros that we wanted in the menu, but
when I attached the template to the new files, the old menu still showed up!  
I think I figured out that I had to delete the old menu from the template and
re-run the CreateMenu subroutine, but I still had problems.  On my computer
the new menu would show up when I opened any of the files, but other team
members would open the files and find no menu (and yes, they had macros
enabled).

I'm trying to write a very very similar program, and need to avoid these
problems.  I'm sorry I don't have the code from our old program available,
but if anyone has any insight into what was happening, and how to avoid that
problem, I would appreciate it.  My main questions are...

How could I have the menus while the other team members did not have them,
if we were opening the same files with the same template attached to those
files?

How do I fix that problem?

Thanks for any help.
Tom
Anne Troy - 28 Mar 2007 07:06 GMT
Hi, td. Try this:
http://vbaexpress.com/kb/getarticle.php?kb_id=14
Also, be sure your code "removes" the toolbar that it creates. I think
that's what happened when you previously had issues.
****************************
Hope it helps!
Anne Troy
www.OfficeArticles.com
****************************
>I have a set of Word Macros that I want to run from a custom menu.  I want
>to
[quoted text clipped - 54 lines]
> Thanks for any help.
> Tom
 
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.