M
Maileen
Hi,
I want to print from my ASP page directly to my network printer. For this i
use the following code, but everytime, my document to print is sent to local
and physical port LPT1
could you help me please ? thx,
Maileen.
'---- to print report on network printer ---
' RSP = stored procedure
Set objFS = CreateObject("Scripting.FileSystemObject")
Set objWSHNet = CreateObject("WScript.Network")
if trim(RSP("p_login"))<>"" then
login=""&trim(RSP("p_login"))&""
heslo=""&trim(RSP("p_heslo"))&""
objWSHNet.AddPrinterConnection "LPT1:", trim(RSP("cesta")), False,login,
heslo
else
objWSHNet.AddPrinterConnection "LPT1:", trim(RSP("cesta")), False
end if
Set objPrinter = objFS.CreateTextFile("LPT1:", True)
....
objPrinter.Write("simple printing test")
objPrinter.Close
'---------------------------------------------------
I want to print from my ASP page directly to my network printer. For this i
use the following code, but everytime, my document to print is sent to local
and physical port LPT1
could you help me please ? thx,
Maileen.
'---- to print report on network printer ---
' RSP = stored procedure
Set objFS = CreateObject("Scripting.FileSystemObject")
Set objWSHNet = CreateObject("WScript.Network")
if trim(RSP("p_login"))<>"" then
login=""&trim(RSP("p_login"))&""
heslo=""&trim(RSP("p_heslo"))&""
objWSHNet.AddPrinterConnection "LPT1:", trim(RSP("cesta")), False,login,
heslo
else
objWSHNet.AddPrinterConnection "LPT1:", trim(RSP("cesta")), False
end if
Set objPrinter = objFS.CreateTextFile("LPT1:", True)
....
objPrinter.Write("simple printing test")
objPrinter.Close
'---------------------------------------------------