Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-07-2012, 04:20 AM
asearle asearle is offline Word 2010:  Shortcut keys Windows 7 64bit Word 2010:  Shortcut keys Office 2010 64bit
Novice
Word 2010:  Shortcut keys
 
Join Date: Aug 2012
Posts: 9
asearle is on a distinguished road
Default Word 2010: Shortcut keys

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
Reply With Quote
  #2  
Old 08-07-2012, 05:19 AM
Charles Kenyon Charles Kenyon is offline Word 2010:  Shortcut keys Windows Vista Word 2010:  Shortcut keys Office 2010 32bit
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,140
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

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.
Reply With Quote
  #3  
Old 08-07-2012, 05:40 AM
asearle asearle is offline Word 2010:  Shortcut keys Windows 7 64bit Word 2010:  Shortcut keys Office 2010 64bit
Novice
Word 2010:  Shortcut keys
 
Join Date: Aug 2012
Posts: 9
asearle is on a distinguished road
Default Templates

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
Reply With Quote
  #4  
Old 08-07-2012, 06:11 AM
asearle asearle is offline Word 2010:  Shortcut keys Windows 7 64bit Word 2010:  Shortcut keys Office 2010 64bit
Novice
Word 2010:  Shortcut keys
 
Join Date: Aug 2012
Posts: 9
asearle is on a distinguished road
Default Excellent! But we need one more piece of information

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
Reply With Quote
  #5  
Old 08-07-2012, 06:14 AM
asearle asearle is offline Word 2010:  Shortcut keys Windows 7 64bit Word 2010:  Shortcut keys Office 2010 64bit
Novice
Word 2010:  Shortcut keys
 
Join Date: Aug 2012
Posts: 9
asearle is on a distinguished road
Default

We put our new templates with normal.dotm but that wasn't picked up when we tried to assign shortcut keys.
Reply With Quote
  #6  
Old 08-07-2012, 07:14 AM
Charles Kenyon Charles Kenyon is offline Word 2010:  Shortcut keys Windows Vista Word 2010:  Shortcut keys Office 2010 32bit
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,140
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

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.
Reply With Quote
  #7  
Old 08-07-2012, 07:16 AM
Charles Kenyon Charles Kenyon is offline Word 2010:  Shortcut keys Windows Vista Word 2010:  Shortcut keys Office 2010 32bit
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,140
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Quote:
Originally Posted by asearle View Post
We put our new templates with normal.dotm but that wasn't picked up when we tried to assign shortcut keys.
Nope. The folder that holds normal.dotm should be personal to the user. Normal.dotm should never be a shared file. The Startup Folder is a completely different folder.
Reply With Quote
  #8  
Old 08-07-2012, 07:23 AM
asearle asearle is offline Word 2010:  Shortcut keys Windows 7 64bit Word 2010:  Shortcut keys Office 2010 64bit
Novice
Word 2010:  Shortcut keys
 
Join Date: Aug 2012
Posts: 9
asearle is on a distinguished road
Default Comprehension ...

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.
Reply With Quote
  #9  
Old 08-07-2012, 08:07 AM
Charles Kenyon Charles Kenyon is offline Word 2010:  Shortcut keys Windows Vista Word 2010:  Shortcut keys Office 2010 32bit
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,140
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Quote:
Originally Posted by asearle View Post
Hallo Charles,

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.
Open your template for editing. (The name of the template will appear at the top of the Word window.)

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.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Word 2010:  Shortcut keys Word VBA: assign shortcut keys to sub??? 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

Other Forums: Access Forums

All times are GMT -7. The time now is 04:04 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft