MUI Language Pack Issue

D

David

Hi,

I am receiving a problem with the following code on MUI enabled Offie XP
installations. The code is failing on "Table Grid" as the program has
translated this to the german equivalent ("Tabellengitternetz"). Is there a
numeric or constant equivalent for this and how do I find it if there is one?

ActiveDocument.Tables.Add Range:=Selection.Range, NumRows:=1,
NumColumns:= _
1, DefaultTableBehavior:=wdWord9TableBehavior,
AutoFitBehavior:= _
wdAutoFitFixed
With Selection.Tables(1)
If .Style <> "Table Grid" Then
.Style = "Table Grid"
End If
.ApplyStyleHeadingRows = True
.ApplyStyleLastRow = True
.ApplyStyleFirstColumn = True
.ApplyStyleLastColumn = True
End With

Thanks in advance
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?RGF2aWQ=?=,

apparently there are no style constants for the table styles. Nasty oversight,
that...

I guess you'd have no choice than to first get the application.language, then
determine that string value required for that language.
I am receiving a problem with the following code on MUI enabled Offie XP
installations. The code is failing on "Table Grid" as the program has
translated this to the german equivalent ("Tabellengitternetz"). Is there a
numeric or constant equivalent for this and how do I find it if there is one?

ActiveDocument.Tables.Add Range:=Selection.Range, NumRows:=1,
NumColumns:= _
1, DefaultTableBehavior:=wdWord9TableBehavior,
AutoFitBehavior:= _
wdAutoFitFixed
With Selection.Tables(1)
If .Style <> "Table Grid" Then
.Style = "Table Grid"
End If
.ApplyStyleHeadingRows = True
.ApplyStyleLastRow = True
.ApplyStyleFirstColumn = True
.ApplyStyleLastColumn = True
End With

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

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

Klaus Linke

apparently there are no style constants for the table styles.
Nasty oversight, that...


Hi David, Cindy,

There are, they just aren't listed in the Object Browser.
Table Grid = -155

You can create a list for all built-in styles with the macro below.

On Error Resume Next
Dim i
For i = -1 To -300 Step -1
Selection.InsertAfter str(i) & vbTab
Selection.InsertAfter ActiveDocument.Styles(i).NameLocal
Selection.InsertParagraphAfter
Next i

Regards,
Klaus
 

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