I need to write some text in a new file, the strings I have to write are command and I need the file properly formatted. The machines where I run it is linux based so the file has to be compliant to the unix standard, the end of line of windows is CR+ LF, i need it to be just LF.
Here is my code:
dim obj as object
obj = CreateObject("ADODB.Stream")
obj.Type = 2
obj.Charset = "utf-8"
obj.open()
obj.WriteText("this is a try" & vbLf)
obj.SaveToFile( "path" ,2)
The file result contains some some character at the begin of the text file.
Can someone tell me where i'm wrong?