Office 2002 compatibility w. previous version

  • Thread starter Thread starter Patrick LEBON
  • Start date Start date
P

Patrick LEBON

Hi,

I have a piece of code developped with Office 2000 that opens a text
file with the method ActiveSheet.QueryTables.Add. My text file is of
MS-DOS type so I added the parameter: .TextFilePlatform = xlMSDOS
The file is correctly converted in Office 2000 but when running under
Office for XP, the xlMSDOS value is ignored and the file is obviously
open as an ANSI text.
So I recorded a macro in Office 2002 and noticed that the parameter had
been changed into: .TextFilePlatform = 850
The documentation of VBA help in Office 2002 still mentions xlMSDOS and
does not refer to 850.

NB: I implemented a workaround that checks the current version of the
app so I must say it does not cause a problem, but I try to understand
the difference between xlMSDOS and 850.

Regards,

Patrick++
 
When I recorded a macro I got:

..TextFilePlatform = 437

Perhaps having different Regional Settings accounts for our different
results. But it looks as if the TextFilePlatform property is not fully
documented in the help file or in the Object Browser.
 
As you guessed, 437 and 850 refer to different Code Page. If my (MS-DOS)
memory serves me well, 437 is U.S. and 850 International (and I'm in
Europe).
 
Back
Top