06-14-2012, 04:43 PM
Hi,
There are two mistakes in ur code
1. file - is a default keyword, it should not be used.
2. Instead of ForWriting you have to use number, ie - 2
Const 1 = ForReading, 2 = ForWriting, 8 = ForAppending
Try below code
There are two mistakes in ur code
1. file - is a default keyword, it should not be used.
2. Instead of ForWriting you have to use number, ie - 2
Const 1 = ForReading, 2 = ForWriting, 8 = ForAppending
Try below code
Code:
Set fsoObj=createobject("scripting.filesystemobject")
Set Ofile = fsoObj.OpenTextFile("D:\bhim\one.txt",2,TRUE)
(06-14-2012, 04:13 PM)manabh Wrote: After set fsoObj=createobject("scripting.filesystemobject") verify fsoObj <> nothing