![]() |
#1
|
|||
|
|||
![]()
Hi Everyone,
I read a report that with this syntax ... Application.MacroOptions Macro:="roevpb", Description:="Beschreibung", ShortcutKey:="ALT+q" ... one could declare the ShortcutKey needed to run a macro. We have used the manual selection (in the menus) of this and that worked OK but we really need to define this in the code because the application will be rolled out to others. Can anyone help us with this? And we also need a way to programmatically add icons/macro calls to the ribbon. Any ideas how this can be done? So far there are recommendations to use blocks of XML to define this but that all seems very complicated. Thanks very much, Alan Searle |
#2
|
|||
|
|||
![]()
Changing the Ribbon:
Yes, it is complicated, when compared to toolbars. It does require XML coding as well as vba. See Customize the Ribbon (It doesn't take rocket science) andRibbonX: Customizing the Office 2007 Ribbon Shortcut Keys: The code you quoted would make a change to normal.dotm. I've never tried this code in a procedure. Have you? I tried it in the immediate Window of Word 2010 and vba does not recognize Application.MacroOptions. An alternative? I've found the simplest way to roll out modifications to the UI is by adding one or more templates to the Startup Folder. If you have your modifications in the template they work for the user. Doing it by code requires that the recipient allow the code to run, at least if you are using vba. |
#3
|
|||
|
|||
![]()
Dear Charles,
You make an interesting point here ... "by adding one or more templates to the Startup Folder. If you have your modifications in the template they work for the user" This could help us so I was wondering which Startup Folder do you mean? Is this for Windows? Or for Word? I scanned our drives and Normal.dotm seems to be in ... \microsoft\templates. Is this where you mean? Indeed, we could maybe programmatically copy specific .dotx and .dotm files there so that they are picked up by the application. This could solve a whole host of other issues that we have and which we are trying to solve programmatically. Many, many thanks for any further tips that you can give us. Regards and thanks, Alan Searle Cologne |
#4
|
|||
|
|||
![]()
Hallo Charles,
I checked out your suggestion and, yes, all .dotm & .dotx templates which we put in the directory "...\microsoft\word" are recognised. That's excellent and we can use this for many things. However, we tried to set up some key shortcuts and found that we had the option to store the settings in either normal.dotm or in the current document. This surprised us because we were expecting to be able to store these settings in the template that we had put into \startup. Do you have any thoughts on this? We're going to try putting the .dotx and .dotm files in the same directory as normal.dotm. Will that help? Many thanks, Alan Searle |
#5
|
|||
|
|||
![]()
We put our new templates with normal.dotm but that wasn't picked up when we tried to assign shortcut keys.
|
#6
|
|||
|
|||
![]()
See Startup Folder.
There is a Startup folder for Word and one for Office. Templates in either become "global templates." I prefer working with the Word folder because it is somewhat more available to the user. Its location can be set or changed under Word options. One thing about using global templates instead of hard coding in normal.dotm is that if something goes wrong it is relatively easy to undo. You just move the template out of the Startup folder and your modifications are gone. You can also load or unload global templates using code. I have one that conceals the buttons on the Reviewing ribbon that I seldom use. I have code that unloads that template (revealing the rest of the Reviewing ribbon) when I need it. That toggle code is triggered by a custom button also on the Reviewing ribbon. |
#7
|
|||
|
|||
![]() Quote:
|
#8
|
|||
|
|||
![]()
Hallo Charles,
What you describe is exactly what we need. I have put templates in the folders that you describe and can adjust the menu ribbon but how do a declare/define where those adjustments are written to? To normal.dotm or to my customized template? Hoping that you can point me towards the location where this is set? Thanks, Alan PS: Under setting shortcuts there was refence to normal.dotm and the current document but not to the template that I had placed in the directory. |
#9
|
|||
|
|||
![]() Quote:
Then assign your keyboard shortcuts. The macros should be in your template and you should store the shortcuts in your template. Ribbon modifications have to be done using XML modification to your template. You cannot do this through the Word user interface, you have to use a separate program. This is described in the links I gave you. Doing this is worth learning, but it is not a 15-minute, or even a single-day, process. It will take some time and effort. The book is about Office 2007 but virtually all of it applies to Office 2010. |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
tinfanide | Word VBA | 2 | 12-05-2011 03:41 AM |
Outlook Mail Shortcut Keys? | gratiot | Outlook | 3 | 07-29-2011 10:31 AM |
Shortcut keys in Find&Replace | fsdance | Word | 0 | 02-11-2011 03:27 PM |
cant use shortcut keys (ctrl+c/v/z...) | laro | Office | 0 | 10-08-2010 11:01 PM |
Can't Assign Shortcut Keys | Vicki F. | Word | 0 | 04-17-2010 03:03 PM |