04-01-2015, 07:34 PM
Plz ignore my above answer...Use
Code:
public Function getunitname
Set fso=createobject("Scripting.Filesystemobject")
Set unit = fso.CreateTextFile "C:\QTP\xyz.txt"
End Function