PDA

View Full Version : Word Menu Customization



MWE
04-03-2005, 08:07 PM
This is not really a VBA question, but this should be a good forum to ask this question ...

In virtually all MS applications, manually assigning a macro to a custom drop down menu is quite easy. Easy to do initially and easy to change later.

However, in Word, the process seems much more difficult; primarly because assigning a macro appears to be an integral part of the menu creation process. And assigning a new macro (or the same macro that has now been moved to a new code module) to an exiting submenu seems impossible (I have found no way to do this other than create a new menu selection with the new macro (or revised location), copy properties from the old submenu, etc).:banghead: Surely there is an easier way.

Thanks

Killian
04-04-2005, 07:11 AM
yeah, you would think so, wouldn't you... :dunno

From what I've been able to gather over the years, it seems to me the 5 core MS Office apps (Word, Excel, PowerPoint, Access, Outlook) have been developed by teams in complete isolation from each other (plus another separate Integration team). While there's a degree of commonality, the fact that they all come from different beginnings (in the days when two apps couldn't be run at the same time, much less talk to each other) means that the methods for doing essentially the same thing can vary between them which can be, to say the least, frustrating...

Anne Troy
04-04-2005, 07:25 AM
To my knowledge, you assign macros nearly the same and as easily as in Excel. I don't understand...

fumei
04-04-2005, 09:02 AM
Neither do I. It is very easy.

1. Right click the menu bar you want to add the macro to.

2. Select Customize.

3. Select the Commands tab.

4. Select Macros.

5. Find the macro you want. NOTE: You may have to switch the file listed in "Save in" tio actually find the macro. Also, Microsoft did not have the sense to make this dialog sizeable. Strange!

6. Simply drag the macro to where ever you want, including menus, sub-menu....whatever.

You are done. Select OK, and there you go.

Killian
04-04-2005, 01:36 PM
Indeed, but if you have already created a menu or toolbar with it's image and you want to later, change the procedure name it calls when it's executed, you have to create a new button, copy/paste the facse over, rename it and delete the old one. Or have I missed something?
In Excel, you can just select a different procedure name from the list.

Anne Troy
04-04-2005, 01:41 PM
Maybe it's something to do with us Word users being less wishy-washy about what we need the first time around...we don't NEED to be changing buttons and such.

Sides, we build 'em in code 'cause it's more appropriate.
LOL!!

Killian
04-04-2005, 01:47 PM
Oh if only I could be so decisive... I suppose. Or maybe not. Whatever.
I agree about building with code - definately the way to go, especially for coding control freaks like me :)

MWE
04-04-2005, 05:56 PM
Indeed, but if you have already created a menu or toolbar with it's image and you want to later, change the procedure name it calls when it's executed, you have to create a new button, copy/paste the facse over, rename it and delete the old one. Or have I missed something?
In Excel, you can just select a different procedure name from the list.
Killian has restated my concern.

As libraries evolve and you tweak names and lib locations, it is VERY easy to asjust menu pick targets in, say, Excel or Project. But Word wnats to be difficult and you end up redoing the menu each time. Not a difficult task, but tedious.


Oh if only I could be so decisive... I suppose. Or maybe not. Whatever.
I agree about building with code - definately the way to go, especially for coding control freaks like me :)
Actually, my approach is (may be?) a little different. I wrote a menu building routine that reads menu info from a file. When a appl start up, it calls the menu builder with the target menu file as a passed arguement. The builder creates the (custom) menu structure by reading from the target file. When the appl shuts down, the menu delete proc reads from the same file to know what to delete. Works quite well and makes adjustments to menu structure, picks, called procs, FaceIDs, gray-outs, etc., a breeze.

I use this approach 95% of the time. But there are a few cases where the standard, manual, customization is the simpliest (or should be!)

Howard Kaikow
04-06-2005, 06:51 AM
Indeed, but if you have already created a menu or toolbar with it's image and you want to later, change the procedure name it calls when it's executed, you have to create a new button, copy/paste the facse over, rename it and delete the old one. Or have I missed something?
In Excel, you can just select a different procedure name from the list.

in word one way isto have a macro that does the toolbar/menu customizations, then for most things, all one needs to do is modify the macro and recreate the critters.

or one could keep a macro hanging around thatcan be edited to tweak particular things.