Styles templates in a MultiLanguage environment

  • Thread starter Thread starter Stefan Blom
  • Start date Start date
S

Stefan Blom

You can use the wdBuiltinStyle constants. For example, the
Normal style can be referenced by wdStyleNormal:

Debug.Print ActiveDocument.Styles(wdStyleNormal).NameLocal

would print to the Immediate Window (Direktfönstret) the
local name of the Normal style (which is "Normal" in English
and Swedish).

For a list of all wdBuiltinStyle constants look in the
Object Browser (Objektgranskning) in the Visual Basic
Editor.
 
When starting up a MS/Word document in a Swedish version the default
startup Style for a new document will be "Normal". This is the case
for many language versions of the program. But for others the default
style will be named different f.i. "Standard".

If you in VBA-code refer to the style by name and uses "Normal" you
will run into problem in those versions. So my question is:

Is there an other way to refer to the default style else then by its
name in VBA?


Best Regards/Jan Holmbom
 
Back
Top