You have given the codings.I tried that code.But i couldn't connect to the printer.
So i want code with detail.So kindly reply me
You din not connect printer???
ok
Open App.path & "\NotpadFile.Txt" For Output As #1 ' Open file for output.
Print #1, Print String
Print #1, Print String
Print #1, Print String
Print #1, Print String
Print #1, Print String
Close #1
-Print String - will use what you want to print
If you Open the NotepadFile you can see the printing format
and to print.... (Use the bellow coding)
Open App.path & "\BatFile.bat" For Output As #1 ' Open file for output.
Print #1, "Type " & App.path & "\NotpadFile.Txt" & ">prn" Close #1
OR
Open App.path & "\BatFile.bat" For Output As #1 ' Open file for output.
Print #1, "copy " & App.path & "\NotpadFile.Txt" & " " & PrinterShareName
Close #1
Shell App.path & "\BatFile.bat", vbHide