Keyboard assignment for Styles & Formatting

  • Thread starter Thread starter Colonel Blip
  • Start date Start date
C

Colonel Blip

I want to use F12 to open the Task Pane to Styles and Formatting. I can't
find it in the list of commands using Customize|Keyboard. Do I need a macro
to do this?
 
I have spent half an hour trying to get an answer to your question. I
assumed it would be a lot easier; and, I still don't have an answer. I tried
to record or write a macro hoping I could find the command that way. No
success.

I got the following from the Task Pane Controller Add-In on the MVP FAQ:

Sub DisplayTaskPane()
On Error Resume Next
CommandBars("Task Pane").Visible = True
End Sub

That still doesn't get you to the particular task pane. I seldom use this
task pane; I prefer to go directly to the older Styles interface and
directly create and modify styles.

I just went into the object browser and found the taskpanes collection. The
following command in a macro will display the Styles and Formatting task
pane.

Application.TaskPanes(wdTaskPaneFormatting).Visible =True

Hope this helps,
 
Wow, didn't mean for you to works so hard on this. Thanks for your effort.

I can use the macro code and make the Styles and Formatting pane show up by
assigning it to F12. However, it is not a toggle like I want.

What is crazy about this is I have the toggle in another dot, but I can't
figure out how I put it there. Works great; it is not a macro, but I don't
know where it is setup. I can make the same thing happen by using a mouse on
the Styles and Formatting tool icon on the format toolbar just to the left
of the style dropdown. However if it has a shortcut assigned to it I don't
know how I did it.


 
Hi,

The button left of the styles dropdown on the formatting toolbar toggles the
formatting pane (... the one with the two AA).
You can press Ctrl+Alt+Num+ (hold Ctrl, hold Alt, press the "+" on the
numeric keypad on the right of the keyboard).
Then click with the cloverleaf cursor on the button. You'll get the
customization dialog, and can assign a keyboard shortcut right there.
If you don't have the button on the formatting toolbar, you can find the
command "FormattingPane" in the keyboard customization dialog (under "All
commands"), and assign a shortcut there.

Regards,
Klaus
 
Klaus gave you your solution, and a nice one it is, too.

For future reference, any boolean state in vba can be toggled.

Dim bState as Boolean
bState = Application.TaskPanes(wdTaskPaneFormatting).Visible
Application.TaskPanes(wdTaskPaneFormatting).Visible = Not bState

--

Charles Kenyon

See the MVP FAQ: <URL: http://www.mvps.org/word/> which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 
For future reference, using your procedure, I discover that the Word command
for this is FormattingPane.
--

Charles Kenyon

See the MVP FAQ: <URL: http://www.mvps.org/word/> which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 
Thanks. I've put that in my tool kit for future reference.

Out of curiosity, not being that familiar with Word and efficiencies, is it
more or less demanding on the normal.dot to use the vba code or to assign
directly to a command like FormattingPane (by demanding I mean does one or
the other approach produce a small normal.dot file)?


 
I've been using Ctrl+Alt+Num+ forever. But I never knew it could be
used on a toolbar button or menu button. Thanks, Klaus.

Larry
 
Back
Top