shellexecute - printto

stokefc22

Member
Hi All,

Has anyone successfully used the printto mode in shellexecute. I can easily print to the default printer with the print mode but the minute I try and use printto along with the printer name or IP address nothing happens.

I've messaged out the return value and I get a code of 42 which I believe means it apparently succeeded as anything above 32 is success??

Just wondering if there is some underlying issue here or whether its an issue with my parameters
 

TheMadDBA

Active Member
It would help to provide an example. Probably something is wrong with the printer name.

Higher values in the return codes are supposed to be the handle ID.
 

stokefc22

Member
The chunk of code is as below, I'm getting the feeling it's going to be my printer parameter too but can't understand why session:printer-name would fail...

Code:
run ShellExecute{&A} (0,
                      ip-mode,              /* ip-mode = printto */
                      ip-file,              /* a valid file name, verified by the search function*/
                      "192.168.1.190:515",  /* printer ip, tried session:printer-name to test default too */
                      "",
                      1,
                      output hInstance).
 

Osborne

Active Member
Did have a problem using printto and "session: printer-name" and solved it by enclosing in quotes:

ip-printer = QUOTER(SESSION: PRINTER-NAME).

Does it work if you try the same?
 

stokefc22

Member
Did have a problem using printto and "session: printer-name" and solved it by enclosing in quotes:

ip-printer = QUOTER(SESSION: PRINTER-NAME).

Does it work if you try the same?

Yes Osborne, that does work thanks. So I can now get it to work with a printer name it's just the IP that doesn't seem to work.
 
Top