Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / October 2006

Tip: Looking for answers? Try searching our database.

Autonumbered Heading style not working in certain languages

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mkate - 13 Oct 2006 02:20 GMT
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.
Signature

Mkate

Jean-Guy Marcil - 13 Oct 2006 19:43 GMT
Mkate was telling us:
Mkate nous racontait que :

> Hello,
>
[quoted text clipped - 15 lines]
> 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
'_______________________________________

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org

Mkate - 19 Oct 2006 23:23 GMT
Thank you very much for the detailed explanation and sample code.  This is
most helpful.

Have a nice day.
Signature

Mkate

> Mkate was telling us:
> Mkate nous racontait que :
[quoted text clipped - 56 lines]
> End Sub
> '_______________________________________
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.