"teste" <wq@xxxxxx> wrote in message
news:newscache$4rmp7k$az$1@xxxxxx
Quote:
> Hi
> Thankyou for the replay but dont work fine.
>
>
> CRLF = Chr(13) & Chr(10)
> sFileName = "c:\testes\teste.ual"
> Set oFSO = CreateObject("Scripting.FileSystemObject")
> Set oFile = oFSO.OpenTextFile(sFileName)
> aFileArray = Split(oFile.ReadAll, CRLF)
>
> Text1.Text = aFileArray(0)
>
> Text2.Text = UBound(aFileArray)
>
> The Text1 display "ÿþ2"
>
> The Text2 display "0"
>
> When I open "c:\testes\teste.ual" With NotePad" display exactli
>
> 23-09-2008 14:23: Alarme de teste Medium
> Alarm
> 23-09-2008 14:23: Alarme de teste Automatically Acknowledged
> 23-09-2008 14:23: Alarme de teste Cleared
> 23-09-2008 14:23: Alarme de teste Medium
> Alarm
> 23-09-2008 14:23: Alarme de teste Automatically Acknowledged
> 23-09-2008 14:23: Alarme de teste Cleared
> 23-09-2008 14:23: Alarme de teste Medium
> Alarm
> 23-09-2008 14:23: Alarme de teste Automatically Acknowledged
> 23-09-2008 14:23: Alarme de teste Cleared
> 23-09-2008 14:23: Alarme de teste Medium
> Alarm
> 23-09-2008 14:23: Alarme de teste Automatically Acknowledged
> 23-09-2008 14:23: Alarme de teste Cleared
This is probably because your text file is not an ASCII file but a Unicode
file. Check the help file "script56.chm" (downloadable from the Microsoft
site) for the full syntax of the OpenTextFile method and how to specify that
the file should be opened in Unicode format.