View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
NickHK NickHK is offline
external usenet poster
 
Posts: 4,391
Default Loss of characters (? instead)

I find code page/character set stuff confusing, but it seems that you are
opening a text file with a code page of 28603, Estonian (ISO), then saving
as a .PRN file.
Not sure, but does the output of xlTextPrinter depend on the capabilities of
ActivePrinter ?
e.g. One printer may be able to represent your file correctly, but another
may not.

NickHK

"IngDah_Blk" wrote
in message ...

A colleague of mine (who has left) wrote a macro for moving a .xls file
to another environment. Until now it worked fine.

The characterset in the .xls file supports characters like
ĻĒŪĪ, etc.
The resultfile however does not contain any of these characters, but a
question mark instead (?). What is wrong in the code?

Workbooks.OpenText Filename:=MyInput, Origin:=28603 _
, StartRow:=1, DataType:=xlFixedWidth,
FieldInfo:=Array(Array(0, 1), Array( _
48, 1)), TrailingMinusNumbers:=True

ActiveWorkbook.SaveAs Filename:=MyFile, FileFormat:= _
xlTextPrinter, CreateBackup:=False

Thanks for any response,
Ingrid


--
IngDah_Blk
------------------------------------------------------------------------
IngDah_Blk's Profile:

http://www.excelforum.com/member.php...o&userid=36754
View this thread: http://www.excelforum.com/showthread...hreadid=564708