Foreign Language Support

G

George Lee

I'd like to add American and Russian words to a List or ListView control. By
default, Cyrillic characters show up as question marks.

How is this done?
 
P

Peter Jamieson

As an experiment, if you enterone of the Words you want in your document,
select it, then use e.g.

myForm.myListBox.AddItem Selection.Text

does the text display correctly?

If you are trying to use literals within your VBA code, I think you will
need to spell the words out using ChrW functions, e.g.

myForm.myListBox.AddItem ChrW(&H409) & ChrW(&H40A)

etc.

Peter Jamieson
 
G

George Lee

Then I don't understand your question. The Russian is already in the document
and it may be a significant amount. When I get ranges that include Russian
characters, they show up as "?"s in the List or ListView.
Are you saying I have to manually convert each character? The time needed to
do that may be worse than the first problem.
Alternately, can the language of the List or ListView be changed?
 
P

Peter Jamieson

Well, you didn't say anything about where you were getting the text from so
I guessed. When I select a Word in Cyrillic script here (Word 2003) and add
it to a Listbox using the code I provided, it works just fine, which
suggested you might be doing something different.

So...

Which version of Word are you using?

Is your Russian text in a regular font such as Times New Roman, or a
specialised Cyrillic font?

Can the font you're using in your Listbox display Cyrillic characters (here,
I'm just using the default font).

Does the other example I provided with the ChrW functions in it work or not?

Peter Jamieson
 
G

George Lee

Thanks for your comments. The following code:
List1.AddItem ChrW(&H409) & ChrW(&H40A)
still produces only "??".

Word 2003, Arial font, Visual Basic 6.
 

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