Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Built-in style names in different languages

36 views
Skip to first unread message

Alison Sanders

unread,
Nov 5, 2009, 7:19:01 AM11/5/09
to
Hi,
I'm working in Office 2003 on Windows XP and I'm trying to find out if the
names of the built-in styles in Word change with different language installs
- I know that the 'TOC' styles used to (eg, they're 'TM' in French and
'Index' in German).
I cannot find any information about this anywhere online and changing my
regional options no longer changes the language in Office (which may be down
to our build).
Any help would be greatly appreciated.

Lene Fredborg

unread,
Nov 5, 2009, 8:20:01 PM11/5/09
to
I can confirm that the style names change depending on the language version
of Word. I constantly need to handle this problem because many Danish
companies use English versions of Word whereas others use Danish versions –
and different language versions may be used in the same company.

In order to be able to switch to another language version of Word, you need
a language pack.

When reading your post, I tried to think of a way to create a list that
includes the English style names together with the style names of the Word
version installed on the individual user’s PC. I have now made a Word
document that contains a table and a couple of macros. You can double-click a
button in the document in order to fill the local style names into a column
of the table. The table also holds the corresponding English style names plus
the constant values that can be used in macros in VBA.

I will make the document plus a description available from my website. I
have not had the time to make that page ready yet but you can download the
Word document via the link below. Save the document on your PC.

Please note that you need to enable macros when you open the document in
order to be able to use the functionality in the document. I have tested the
document in Word 2003 and Word 2007 and it works here.

If you do not have access to the language version for which you want to
retrieve the styles names, you may send a copy of the document to somebody
who has that version and ask him/her to run the macro, save the document and
return it to you.

Later, I may be able to make a list available that is pre-completed with the
style names in a number of languages.

Download link:
http://www.thedoctools.com/downloads/Create-List-Of-BuiltIn-Styles_DocTools.doc

--
Regards
Lene Fredborg - Microsoft MVP (Word)
DocTools - Denmark
www.thedoctools.com
Document automation - add-ins, macros and templates for Microsoft Word

Tony Jollans

unread,
Nov 6, 2009, 11:31:50 AM11/6/09
to
You don't say why you want to know - or what you want to do. Normally
changes in the UI would not be a problem for users, so maybe you want to
work with the Styles in VBA - in which case there is a built-in enumeration,
WdBuiltInStyle, that has constants for all the built-in ones, wdStyleTOC1,
for example.

--
Enjoy,
Tony

www.WordArticles.com

"Alison Sanders" <Alison...@discussions.microsoft.com> wrote in message
news:3FA116AD-40C4-4487...@microsoft.com...

Lene Fredborg

unread,
Nov 6, 2009, 12:24:12 PM11/6/09
to
Tony,

It is a problem in some situations, e.g. when using StyleRef fields. When a
StyleRef field needs to refer to a heading style, you can handle it by
including the heading number only instead of the full style name, e.g. {
StyleRef 1 } instead of { StyleRef "Heading 1" }. The latter would result in
an error if the user has another language version than English. But for
other styles, you do not have the same option - you need the correct style
name as it appears in the GUI.

I included the VBA constant values plus the English style names in the
solution described in my previous post.


--
Best regards
Lene Fredborg


Microsoft MVP (Word)
DocTools - Denmark

http://www.thedoctools.com

"Tony Jollans" <My forename at my surname dot com> skrev i en meddelelse
news:u$Y96%23vXKH...@TK2MSFTNGP05.phx.gbl...

Tony Jollans

unread,
Nov 6, 2009, 1:59:34 PM11/6/09
to

Of course! Thank you Lene.

It really is time Microsoft addressed this kind of issue. I haven't checked
recently but Excel has similar issues - for example, cell formulae are
tokenised but, if I remember, formulae in conditional formatting rules are
held as text.

--
Enjoy,
Tony

www.WordArticles.com

"Lene Fredborg" <l...@thedoctools.com> wrote in message
news:eCU62XwX...@TK2MSFTNGP05.phx.gbl...

Lene Fredborg

unread,
Nov 6, 2009, 8:58:04 PM11/6/09
to
You will now find an article with the title “Macro – create list of local
built-in style names” here:
http://www.thedoctools.com/index.php?show=mt_create_style_name_list

From the page, you can also download the Word document linked in my previous
post.

--
Regards
Lene Fredborg - Microsoft MVP (Word)
DocTools - Denmark
www.thedoctools.com
Document automation - add-ins, macros and templates for Microsoft Word

Alison Sanders

unread,
Nov 9, 2009, 6:21:02 AM11/9/09
to
Thank you, Lene! That is extremely helpful. :o)
I did get IT to install a couple of language packs for me and I was just
starting to search for constants in the object browser - it's good to know I
was heading in the right direction.
Thanks again,
Alison

Lene Fredborg

unread,
Nov 9, 2009, 8:58:02 AM11/9/09
to
You are welcome. I am glad I could help.
0 new messages