View Single Post
  #15   Report Post  
Klaus Linke
 
Posts: n/a
Default

Hi Kenneth,

The Encoding was meant to be used in the macro from the KB article:

' Replace the FileName example with the path to your text file.
Documents.Open FileName:=3D"Z:\data\ROSTER.TXT", _
Format:=3DwdOpenFormatText, Encoding:=3DmsoEncodingWestern

As there doesn't seem to be a way to specify the encoding for =
InsertFile, I'd open the text file as a new document with the code =
above, and then copy/paste it into your document.

The code you posted (re HKEY_LOCAL_MACHINE) is from the =
EditConversionOptions macro (support9.dot)?
I don't think you need that.

If it's not confidential, you might mail the text file to my private =
mail address, so I can experiment a bit.
Probably Word (Insert File) tries to guess the encoding from the =
characters used in the text file, and is thrown off by some unusual =
characters in the text file.=20

Using the method you described, I see that Word is using
code page 1200 when I open the TXT file, so that is no doubt
the source of the problem I am having. Why might that be
happening?


1200 is for Unicode and usual for a Word doc. I guess you used "Insert =
File", not "File Open"?
Then 1200 isn't surprising.

Regards,
Klaus