Sub Example_CreateTxtFile()
Dim strFileName As String
Dim ff As Long
Dim strData As String
Dim aryData
Dim cnt As Long
strFileName = "c:\pdf995\res\utilities\email.txt"
If Dir(strFileName) <> "" Then Kill strFileName
ff = FreeFile
Open strFileName For Output As #ff
Print #1, Chr(34) & "ID" & Chr(34) & "," & Chr(34) & "Description" & Chr(34)
Print #1, "1," & Chr(34) & "Hello" & Chr(34)
Print #1, "2," & Chr(34) & "World" & Chr(34)
Print #1, "3," & Chr(34) & "OK" & Chr(34)
Close #ff
End Sub
|