Apply Style Using Keyboard Only

B

Ben Foster

I want to be able to apply a style to the select text using the keyboard
only. I can't find a way to do this - I have to use the mouse. At present I
click on the Style drop down and then select a style. I want to be able to
drop down the list using the keyboard only. Can anyone help ?

Ben Foster
 
C

Charles Kenyon

Hi,

Try Ctrl-Shift-S. It depends on your version of Word. In Word 97 this lets
you access the styles window on the formatting toolbar and type in your
style name. Then you hit Enter to apply the style.

If you have a later version you'll need to add the following macro that
Klaus Linke wrote for me a while back. Then assign that macro to a keyboard
shortcut.

Sub MyStyleDropDown()
' from Klaus Linke on newsgroups
' 2003 December 12
'
Dim myCBCB As CommandBarComboBox
Set myCBCB = _
CommandBars.FindControl(id:=1732, _
Visible:=True)
If myCBCB Is Nothing Then
Dialogs(wdDialogFormatStyle).Show
Else
SendKeys "{ENTER}"
myCBCB.SetFocus
End If
End Sub

Hope this helps.
 
K

Klaus Linke

Hi Charles,

I think the macro was just needed to fix some bug in Word 2000, and only if the style dropdown was on a custom toolbar?

Ctrl+Shift+S seems to work fine in Word2003 (no matter where the style dropdown is).

Once the combo box has the focus, you can expand it with Alt+Down, and then move around with the cursor keys.

Regards,
Klaus
 
B

Ben Foster

Charles,

Ctrl-Shift-S works great. Thanks.

Ben

Charles Kenyon said:
Hi,

Try Ctrl-Shift-S. It depends on your version of Word. In Word 97 this lets
you access the styles window on the formatting toolbar and type in your
style name. Then you hit Enter to apply the style.

If you have a later version you'll need to add the following macro that
Klaus Linke wrote for me a while back. Then assign that macro to a
keyboard shortcut.

Sub MyStyleDropDown()
' from Klaus Linke on newsgroups
' 2003 December 12
'
Dim myCBCB As CommandBarComboBox
Set myCBCB = _
CommandBars.FindControl(id:=1732, _
Visible:=True)
If myCBCB Is Nothing Then
Dialogs(wdDialogFormatStyle).Show
Else
SendKeys "{ENTER}"
myCBCB.SetFocus
End If
End Sub

Hope this helps.
 
T

TF

Ben

It depends on your version of Word but the basics is similar for all. Select
Format, Style to open the Style dialog or Task Pane. Click on the drop down
button on the Style you want to assign a shortcut. Select Modify. Check the
Add to Template box and then click on Format. The lower selection is
Keyboard Shortcut. Assign your shortcut and OK out of the dialog. Do the
same for the remainder of the styles. Make sure that you save changes to the
global template when prompted on closing Word (and Outlook if it is open).



:I want to be able to apply a style to the select text using the keyboard
: only. I can't find a way to do this - I have to use the mouse. At present
I
: click on the Style drop down and then select a style. I want to be able to
: drop down the list using the keyboard only. Can anyone help ?
:
: Ben Foster
:
:
 
C

Charles Kenyon

Ah... OK then I can remove it from my Add-In since I'm now using 2003.
Thanks for the update. Glad I suggested trying the shortcut first!
 
C

Charles Kenyon

I guess I still need to use it on my system because I use my own custom
formatting toolbar.
 

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