I developed a Word 2003 report generation application that extracts data from a database.
Most of the organization uses English versions of Windows and Office. But, many users in our French office use their local versions. If I use any of Word's built-in Heading styles Heading (1-9), the French version expects Titre (1-9).
In my current solution, the user sets a Form option and VBA does the following:
Dim HeadingStyle as String
Dim HeadingLevel as Integer
If ChooseReportFrm.FrenchOpt.Value = True Then
HeadingStyle = "Titre "
Else
HeadingStyle = "Heading "
End If
...
Call InsertText(HeadingStyle & CStr(HeadingLevel))
I would like to make this process automatic and completely transparent to the user. I have been searching in vain for a location-independent way to set the correct style, such as an enumerated constant. Does anybody have any ideas for a more elegant solution?