Styles in Word 2002

C

Charles Kenyon

I am used to pressing Ctrl-Shift-S to access the Styles window on my
toolbar. When I do, it opens the Styles dialog instead. Can someone tell me
what the WordCommand to access that Window is so I can reassign it to my
shortcut?

Also, I am using a character style for the first part of a paragraph (a case
citation). I tried assigning that to a keyboard shortcut and it went crazy!
It turned into a paragraph style. Can only paragraph styles be assigned
shortcuts? (I can write a macro to do it, but it's a pain.)
--

Charles Kenyon

Word New User FAQ & Web Directory:
<URL: http://addbalance.com/word/index.htm>

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide)
<URL: http://addbalance.com/usersguide/index.htm>

See also 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.
 
K

Klaus Linke

Charles Kenyon said:
I am used to pressing Ctrl-Shift-S to access the Styles window
on my toolbar. When I do, it opens the Styles dialog instead.
Can someone tell me what the WordCommand to access that
Window is so I can reassign it to my shortcut?


Hi Charles,

Ctrl+Shift+S is the "Style" command (WordBasic.Style).

If the style dropdown in on some visible toolbar (usually the formatting
toolbar), it'll access that.

If the style dropdown isn't on a toolbar, it will open the FormatStyle
dialog.


In case you have the style dropdown on a toolbar, and still the dialog
opens, something definitely fishy must be going on.

Also, I am using a character style for the first part of a paragraph (a case
citation). I tried assigning that to a keyboard shortcut and it went crazy!
It turned into a paragraph style. Can only paragraph styles be assigned
shortcuts? (I can write a macro to do it, but it's a pain.)

Should work fine... What version of Word did you use, and what shortcut did
you try?

I haven't seen character styles turn into paragraph styles yet, and would
like to try and reproduce your problem...

Greetings,
Klaus
 
C

Charles Kenyon

Hi Klaus,

Problem 1: Standard shortcut - Ctrl-Shift-S

I'm using Word 2002 SP-2. I use a personal formatting toolbar. I just tried
activating the built-in one and the Ctrl-Shift-S works. My toolbar was built
primarily in Word 97 and doesn't have the button to open the Styles pane. I
tried copying both the pane button and the styles drop-down from the
Formatting Toolbar to my own toolbar and the shortcut still doesn't work.
(Worked in Word 97 & 2000.)

I tried typing WordBasic.Style in my immediate window and got a "Wrong
number of parameters" error message. Do I need more?

Problem 2: Assigning shortcut to char style.
I couldn't replicate it. After that happened, I deleted both the paragraph
and character styles. Then I copied them from another document. It appears
that the shortcut I tried to assign before is now assigned to my char style!
The shortcut is Ctrl-Shift-C.

This was the strangest thing I've seen with Word for quite a while.
--

Charles Kenyon

Word New User FAQ & Web Directory:
<URL: http://addbalance.com/word/index.htm>

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide)
<URL: http://addbalance.com/usersguide/index.htm>

See also 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.
 
S

Suzanne S. Barnhill

Ctrl+Shift+C is by default assigned to CopyFormat, a very useful command
that I would be loath to give up.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://www.mvps.org/word
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
C

Charles Kenyon

I know. I was just assigning it in this one document where I was using that
character style about every third paragraph. I'm still working on it 20
pages and counting...
--

Charles Kenyon

Word New User FAQ & Web Directory:
<URL: http://addbalance.com/word/index.htm>

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide)
<URL: http://addbalance.com/usersguide/index.htm>

See also 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.
 
K

Klaus Linke

Problem 1: Standard shortcut - Ctrl-Shift-S
I'm using Word 2002 SP-2. I use a personal formatting toolbar. I just tried
activating the built-in one and the Ctrl-Shift-S works. My toolbar was built
primarily in Word 97 and doesn't have the button to open the Styles pane. I
tried copying both the pane button and the styles drop-down from the
Formatting Toolbar to my own toolbar and the shortcut still doesn't work.
(Worked in Word 97 & 2000.)


Hi Charles,

Didn't notice that before.

I thought it would work the same way, no matter whether the "Style" combobox
is on the formatting toolbar or on a custom toolbar.

A bit of a clumsy work-around would be to select your "Style" dropdown on
your custom toolbar with a macro, and link Ctrl+Shift+C to that macro:

Dim myCBCB as CommandBarComboBox
Set myCBCB =
CommandBars("yourToolbarCaption").Controls("yourComboboxCaption")
SendKeys "{ENTER}"
myCBCB.SetFocus

(Haven't found a way to select the current text in the graphic combo without
"SendKeys")

Regards,
Klaus
 
K

Klaus Linke

Hi Charles,

Improved a bit, the macro below should select the text in the style dropdown
as long as that is visible on any toolbar, and should bring up the
FormatStyle dialog if the dropdown isn't on any toolbar:

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

Klaus
 
C

Charles Kenyon

Thank you Klaus. Works like a charm. How did you find the ID#?

I've incorporated the macro in my Add-In that has the toolbar.


--

Charles Kenyon

Word New User FAQ & Web Directory:
<URL: http://addbalance.com/word/index.htm>

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide)
<URL: http://addbalance.com/usersguide/index.htm>

See also 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.
 
K

Klaus Linke

Charles Kenyon said:
Thank you Klaus. Works like a charm. How did you find the ID#?

I've incorporated the macro in my Add-In that has the toolbar.


Hi Charles,

There isn't an "official" list with the ID #s from MS anywhere, as far as I
know.
I compiled a list for myself a while ago.

Probably the code from Howard Kaikow in
http://www.google.com/groups?selm=#GT6QNC0BHA.2804@tkmsftngp05 could be
used to make such a list; Lutz Gentkow posted a link to a German website
with VBA code later in the same thread.

Greetings,
Klaus
 
C

Charles Kenyon

Thank you again. I've saved the thread and code in a Word doc to study
later.

--

Charles Kenyon

Word New User FAQ & Web Directory:
<URL: http://addbalance.com/word/index.htm>

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide)
<URL: http://addbalance.com/usersguide/index.htm>

See also 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.
 
K

Klaus Linke

I've saved the thread and code in a Word doc to study later.


Hi Charles,

You might also bookmark the thread

Subject: A macro to list all word cmds and their descriptions ?
From: Mitrokhin <[email protected]>
Newsgroups:
microsoft.public.mac.office.word,microsoft.public.word.vba.general
Message-ID: <181220031628523469%[email protected]>
Date: Thu, 18 Dec 2003 15:28:24 GMT

Regards,
Klaus
 

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