following is the code to create & write contents in text file:
Set fso = CreateObject("Scripting.FileSystemObject")
Set a = fso.CreateTextFile("c:\testfile.txt", True)
a.WriteLine("This is a test.")
a.Close
set a = nothing
set fso = nothing
For printing, please check the following link:
http://www.taltech.com/TALtech_web/s..._Printing.html
Om Prakash