In the previous post, I described how you can define keyboard shortcuts from VBA in Microsoft Word. As I said, this is a powerful technique that can boost your productivity greatly. Now, consider this situation. What if you want to have multiple sets of shortcuts that can be switched easily? For example, you may have a set of shortcuts for working with drawing objects, another set for working with text, etc. The whole point is that if you can switch whole sets of shortcuts, you can reassign familiar key combinations to other actions.
This can be easily done. For each set of shortcuts, create a macro that defines the shortcut keys and a macro that clears those shortcuts. That's all it takes to have multiple sets of easily interchangeable shortcut sets.
Here is an example:
Sub DefineSet1()
KeyBindings.Add KeyCategory:=wdKeyCategoryCommand, Command:="ViewWeb", KeyCode:=BuildKeyCode(wdKeyW, wdKeyAlt, wdKeyControl)
KeyBindings.Add KeyCategory:=wdKeyCategoryMacro, Command:="MyMacro", KeyCode:=BuildKeyCode(wdKeyS, wdKeyAlt, wdKeyShift)
KeyBindings.Add KeyCategory:=wdKeyCategoryStyle, Command:="MyStyle", KeyCode:=BuildKeyCode(wdKeyC, wdKeyAlt, wdKeyControl, wdKeyShift)
KeyBindings.Add KeyCategory:=wdKeyCategorySymbol, Command:=" " & ChrW(Val("&H2011")), KeyCode:=BuildKeyCode(wdKeyHyphen, wdKeyAlt, wdKeyControl, wdKeyShift)
End Sub
Sub ClearSet1()
FindKey(BuildKeyCode(wdKeyW, wdKeyAlt, wdKeyControl)).Clear
FindKey(BuildKeyCode(wdKeyS, wdKeyAlt, wdKeyShift)).Clear
FindKey(BuildKeyCode(wdKeyC, wdKeyAlt, wdKeyControl, wdKeyShift)).Clear
FindKey(BuildKeyCode(wdKeyHyphen, wdKeyAlt, wdKeyControl, wdKeyShift)).Clear
End Sub
For each set of shortcut keys, you must create one macro for assigning the key combinations and one macro for clearing them. By running the respective macros, you can easily switch between multiple sets of shortcut keys.
It is considered as a "helpful post for the community". Keep posting.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Nice post. Useful also
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
@ghasemkiani you realy done an awesome work on the two sides by utilizing Steemit Forum. in one hand you shared instructive related articles for extraordinarily understudies and in the other hand you bolstered everybody who comment on your blog, that is realy appreciable. your past and this post are extremely useful for "Keyboard Shortcuts in Microsoft Word" an excessive amount of learnt from you. Much obliged.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
This is very useful as we all need the help of shortcut.
Thanks for sharing this post.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Hey @ghasemkiani, This is my very first comment on any of your posts. I randomly landed here and after reading this post, I feel happy that I did. Though we are living in modern times where we can solve the problems with a single click yet modern life is not simple but complicated. So, the technique that you mentioned is a smart way to save time.
Thank You. Keep sharing the smart posts. Stay awesome man.
Steem On!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Helpful. Lemme just get to it.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
"Nice post share sir & you always give our helpful post & thanx you so much for sharing . #resteem & upvote done .
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
good article
I hope everyone will be benefited
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
i likes in your post dear
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
well done sir
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
sorry for late . now i watch this post dear. alredy resteemed this post @ghasemkiani
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Helpful post.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
This post has received a 10.55 % upvote from @buildawhale thanks to: @ghasemkiani. Send at least 1 SBD to @buildawhale with a post link in the memo field for a portion of the next vote.
To support our daily curation initiative, please vote on my owner, @themarkymark, as a Steem Witness
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
very useful post sharing dear @ghasemkiani for Microsoft-word user . thanx you . this post #resteem & upvote done .
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Wow, very very useful techniques dear @ghasemkiani. This is like a magic using macros. Thanks dear. Keep Sharing!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
nice post. shared :)
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
you always have the best content ghasemkiani keep it up!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit