Keyboard shorcuts for a macro

L

Libcub

I recorded a macro that adds a rightward arrow (U+2192) and then a no-width
optional break. (Macro code is below.) I have 2 shortcut keys assigned to it:
Ctrl+\ and Ctrl+F11. The Ctrl+F11 shortcut key works fine. But the Ctrl+\
shortcut only supplies the arrow character, and not the no-width optional
break. Why the heck is the macro behaving differently depending on which
shortcut key invokes it?

Thanks for any light shed on this!

Macro:
Sub atest()
'
' atest Macro
'
'
Selection.InsertSymbol Font:="Book Antiqua", CharacterNumber:=8594,
Unicode:=True
Selection.InsertSymbol CharacterNumber:=8204, Unicode:=True, Bias:=0
End Sub
 
S

Suzanne S. Barnhill

FWIW, you don't need a macro. You could just as easily do this with an
AutoCorrect entry.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org
 
L

Libcub

I want to able to have the no-width optional break selectively, one shortcut
giving just the arrow, and another giving both the arrow and the optional
break. A macro seemed the best solution.
 
S

Suzanne S. Barnhill

Well, you can certainly have two AutoCorrect entries. Or you can assign a
keyboard shortcut to the No-Width Optional Break alone (select it on the
Special Characters tab of Insert | Symbol and click Shortcut Key...).

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top