Internationalization issue "Table Grid"

N

Nigel Bufton

The following crashes on non-English language systems.

With oApp.Selection.Tables(1)
If .Style <> "Table Grid" Then
.Style = "Table Grid"
End If
End With

How should this be expressed to work in all locales?

(This is in a VB6 app using late binding.)

Thanks,
Nigel
 
D

Doug Robbins - Word MVP

I believe that if you are using late binding, attribute names such as "Table
Grid" will need to be replaced by the numeric index number of that style.
Somewhere there is a way to determine what that is, but my memory fails me
at the moment.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
 
N

Nigel Bufton

I found it through brute force looping through values.

With oApp.Selection.Tables(1)
.Style =-155 ' "Table Grid"
End With

I removed the conditional because testing "If .Style <> -155" always
returns true.

Nigel
 

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