alifyusuf
asked on
printing to a remote printer
i am writing an application which requires me to print to a dot matrix printer
hence to print i wrote the following code
Open "\\Node1\Epson" For Output As #1
Print #1, "Text to be printed "
Close #1
now, we have two machine node1 and node2 the printer is physially attached to node1 and the share name of the printer is Epson, when i run my application on node2 the print output is perfect with no errors
but when i try to print from node1 itself i get the following error
Run time error "52"
Bad file name or number
can some one help me with the problem
hence to print i wrote the following code
Open "\\Node1\Epson" For Output As #1
Print #1, "Text to be printed "
Close #1
now, we have two machine node1 and node2 the printer is physially attached to node1 and the share name of the printer is Epson, when i run my application on node2 the print output is perfect with no errors
but when i try to print from node1 itself i get the following error
Run time error "52"
Bad file name or number
can some one help me with the problem
I think you'll have to use the printer object.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Maybe the second node can't be resolved by your operatingsystem,
you should be able to ping your nodes and see whether you can print from e.g. notepad.
regards