Autonumbered Heading style not working in certain languages

M

Mkate

Hello,

My company recently updated their Word templates, which are used worldwide
for creating proposals. The updates included adding a new toolbar with
buttons as well as a toolbar with pull-down menus. One of the styles added
was an autonumbered style, which we based on the MS Heading 1-6 styles and
added autonumbering.

I have heard from several users in Taiwan, Japan, and China that the toolbar
buttons and the pull-down menu items are not working, either in English or
their native language. However, if they go to the MS Word pull-down menu, the
styles work correctly for them. The users are on either MS Word 2002 (SP3) or
MS Word 2003 (SP2).

I am thinking their is a conflict with their particular setup that is
preventing this style from working on the new toolbars. Has anyone
experienced a similiar problem or heard of this and could share their
experience or perhaps a fix for the problem? Could it be another application
toolbar causing the conflict?

Thank you very much for your response.
 
J

Jean-Guy Marcil

Mkate was telling us:
Mkate nous racontait que :
Hello,

My company recently updated their Word templates, which are used
worldwide for creating proposals. The updates included adding a new
toolbar with buttons as well as a toolbar with pull-down menus. One
of the styles added was an autonumbered style, which we based on the
MS Heading 1-6 styles and added autonumbering.

I have heard from several users in Taiwan, Japan, and China that the
toolbar buttons and the pull-down menu items are not working, either
in English or their native language. However, if they go to the MS
Word pull-down menu, the styles work correctly for them. The users
are on either MS Word 2002 (SP3) or MS Word 2003 (SP2).

I am thinking their is a conflict with their particular setup that is
preventing this style from working on the new toolbars. Has anyone
experienced a similiar problem or heard of this and could share their
experience or perhaps a fix for the problem? Could it be another
application toolbar causing the conflict?

If you simply created the buttons on the toolbar by using the style names,
then they will only work in the language used to create those buttons.
If I use an English version of Word to create a toolbar style button for
"Heading 1", this button will not work in French because the style "Heading
1" does not exist in French; it is called "Titre 1".

So, you need a macro behind the button to make this button international.
For example, on an English version of Word, I created a toolbar, on this
toolbar I added a menu, in this menu I added three times the same macro
(GetStyle).
Then I gave a different caption to each of these button: "Titre 1", "Titre
2" and "Titre 3".
Then I used these macros to apply the style. This will work in any localized
version of Word/Office.

'_______________________________________
Sub GetStyle()

Select Case Application.CommandBars.ActionControl.Caption
Case "Titre 1"
ApplyStyle ActiveDocument.Styles(wdStyleHeading1)
Case "Titre 2"
ApplyStyle ActiveDocument.Styles(wdStyleHeading2)
Case "Titre 3"
ApplyStyle ActiveDocument.Styles(wdStyleHeading3)
End Select

End Sub
'_______________________________________

'_______________________________________
Sub ApplyStyle(strStyleName As String)

Selection.Range.Style = strStyleName

End Sub
'_______________________________________

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
M

Mkate

Thank you very much for the detailed explanation and sample code. This is
most helpful.

Have a nice day.
 

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