Automating Test Automation Home Automation Articles Downloads QTP Gotchas Links Books Contact About Site Map
File Function - Write StringThis sub writes a string to a file If you find an error, or have a suggestion for improvement, Email me and I'll fix it. Download it Here (right-click and then save target as). (NOTE - you can just cut & paste from below, but the formatting will have multiple spaces instead of tabs).
'=========================================================================
Sub zFile_WriteString(sFileName, sString) Const ForReading = 1, ForWriting = 2, ForAppending = 8 Dim oFso, oFile Set oFso = CreateObject("Scripting.FileSystemObject") Set oFile= oFso.OpenTextFile(sFileName, ForWriting, True) oFile.Write(sString) oFile.Close Set oFile = Nothing Set oFso = Nothing End Sub '========================================================================= |