styles in different language version of word

W

ward

Hi,

I've created a toolbar (as part of an add-in) with some
frequently used styles on it (this is possible by using
customize -> commands-> and then dragging the styles to
the desired toolbar)

The problem is that the add-in is used in both English
version of Word as well as Dutch versions of Word. As you
may know or not, the built in styles of word are
automatically translated to the name in the corresponding
version of Word. For example:
- if you create a document in an english Word version and
apply style 'Heading 1'
- and you open it on a pc with a Dutch version of Word,
then the displayed style will be 'Kop 1'

Now it has turned out that styles that have been dragged
onto a toolbar are not translated in other language
version, and that clicking them does not apply any style.
Thus a toolbar with a shortcut button for style 'Heading
1' will not work on a Dutch Word version.

Anybody a solution for this?

Ward
 
H

Helmut Weber

Hi Ward,
not a straightforward solution, though you might
consider creating makros like Head_1 etc. that apply
e.g. the style that has the outlinelevel 1. Would
even work in chinese, I guess. Here a small testsub
to get the outlinelevels.
Dim aF As Style
For Each aF In ActiveDocument.Styles
On Error Resume Next
If aF.ParagraphFormat.OutlineLevel < 10 Then
Debug.Print aF.NameLocal, _
aF.ParagraphFormat.OutlineLevel
End If
Next
Greetings from Bavaria, Germany
Helmut Weber
"red.sys" & chr$(64) & "t-online.de"
Word 97, NT 4.0
 
C

Cindy Meister -WordMVP-

Hi Ward,

I'd consider using macros to apply the styles. It's a bit
more overhead, but then you do have the option of using
Word's built-in style constants, which are the same across
all languages (and why they were included).

Selection.Range.Style = _
ActiveDocument.Styles(wdStyleHeading1)
The problem is that the add-in is used in both English
version of Word as well as Dutch versions of Word. As you
may know or not, the built in styles of word are
automatically translated to the name in the corresponding
version of Word. For example:
- if you create a document in an english Word version and
apply style 'Heading 1'
- and you open it on a pc with a Dutch version of Word,
then the displayed style will be 'Kop 1'

Now it has turned out that styles that have been dragged
onto a toolbar are not translated in other language
version, and that clicking them does not apply any style.
Thus a toolbar with a shortcut button for style 'Heading
1' will not work on a Dutch Word version.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jan
24 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any
follow question or reply in the newsgroup and not by e-mail
:)
 

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