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?
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
> 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?
George Lee - 26 Jan 2006 15:43 GMT
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?
> As an experiment, if you enterone of the Words you want in your document,
> select it, then use e.g.
[quoted text clipped - 17 lines]
> >
> > How is this done?
Peter Jamieson - 26 Jan 2006 17:19 GMT
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
> Then I don't understand your question. The Russian is already in the
> document
[quoted text clipped - 27 lines]
>> >
>> > How is this done?
George Lee - 27 Jan 2006 14:47 GMT
Thanks for your comments. The following code:
List1.AddItem ChrW(&H409) & ChrW(&H40A)
still produces only "??".
Word 2003, Arial font, Visual Basic 6.
> 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
[quoted text clipped - 46 lines]
> >> >
> >> > How is this done?
Peter Jamieson - 27 Jan 2006 18:32 GMT
If you are using VB6, there's a problem because the Forms do not support
Unicode. You may find http://support.microsoft.com/kb/193540/en-us
helpful.
If you are actually using VBA, I can't reproduce the problem here. and am
out of ideas.
Will be offline for a few days.
Peter Jamieson
> Thanks for your comments. The following code:
> List1.AddItem ChrW(&H409) & ChrW(&H40A)
[quoted text clipped - 60 lines]
>> >> >
>> >> > How is this done?
George Lee - 30 Jan 2006 17:40 GMT
That was it! Thanks.
> If you are using VB6, there's a problem because the Forms do not support
> Unicode. You may find http://support.microsoft.com/kb/193540/en-us
[quoted text clipped - 71 lines]
> >> >> >
> >> >> > How is this done?