Re: Reading Russian text in Word2003 VBA code
From: Klaus Linke (info_at_fotosatz-kaufmann.de.no.junk)
Date: 07/24/04
- Previous message: Chad DeMeyer: "Re: Copy and paste top of form to new page"
- Maybe in reply to: Word Heretic: "Re: Reading Russian text in Word2003 VBA code"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 25 Jul 2004 00:40:15 +0200
Hi Dave,
Likely, your string contains the correct cyrillic string, but the control
or editor you display it in can't deal with Unicode.
The VBA editor, immediate window or a MsgBox will display question marks
for characters that aren't in the code page they are set up for.
Put the string somewhere in a document (say, Selection.InsertAfter
gsContentTr), and it'll probably show fine.
Whether the database can deal with Unicode, or the mechanism that you use
to connect with the database, is another question :-/
Regards,
Klaus
"Dave Farmer" <anonymous@discussions.microsoft.com> schrieb im Newsbeitrag
news:21e1301c45d13$5c40f820$a601280a@phx.gbl...
> Hi,
>
> I have a vba application in Word 2003 (running on XP) that
> reads text from named form fields as so:
>
> Selection.GoTo what:=wdGoToBookmark, Name:=CStr(f1name)
> gsContentTr = Selection.Text
>
> where f1name is the name of the form field I'm looking for.
>
> The purpose of the application is to load translations
> into a SQL server database. The code looks for the
> correctly named field in the document (which has been sent
> out for translation by an agency), reads the text and
> loads it into the database.
>
> It works fine for French, German, Spanish etc. but for
> Russian all I get is "???????". This is at the
> Selection.Text stage (investigating through debug, the
> entire selection object has none of the Russian characters
> anywhere, just question marks), so it appears that vba as
> it is installed on my PC cannot interpret those characters.
>
> I have installed Office support for the Russian language
> via Microsoft Office 2003 Tools Language Settings, but to
> no avail.
>
> Can anyone help? Is this a limitation of VBA itself, or
> can I do something that will allow the reading of cyrillic
> characters?
>
> Cheers,
>
> Dave.
- Previous message: Chad DeMeyer: "Re: Copy and paste top of form to new page"
- Maybe in reply to: Word Heretic: "Re: Reading Russian text in Word2003 VBA code"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|