SHELL LPR

rkapfer

Registered User.
Local time
Today, 06:17
Joined
Jul 26, 2002
Messages
14
All of sudden lpr has stopped working code:
cm = "cmd /c lpr -S " & IP & " -P Port0 " & FileName
x = Shell(cm,1)

The dos window shows Error: host 192.168.1.126 not found

I created .bat file
lpr -S 192.168.1.126 -P Port0 %USERNAME%.ZPL

This works fine off a desktop shortcut

What would stop Shell(command) from stopping
 
Last edited:
maybe 192.168.1.126 is offline?
 
Perhaps FileName is not resolving to %USERNAME%.ZPL
?

Add a Debug.Print cm line after setting the variable and before calling the Shell function to check what is output in the Immediate Window (Ctrl+G)
 

Users who are viewing this thread

Back
Top Bottom