What are the parameters for "printto" using shellexecute?

delphi, printing, shellexecute, winapi

Solution

You need to pass the network network address of the printer in the arguments parameter.

ShellExecute(
  WindowHandle,
  'printto',
  PChar(DocumentName),
  PChar(PrinterNetworkAddress),
  nil,
  SW_HIDE
);

Problem

I'm using Delphi's winapi ShellExecute to try to print to a user selected printer and not the default printer. I'm trying to figure out the syntax for a command using the printto verb. What would an example shell execute statement look like if I wanted to print manual.pdf to a HP Laser Jet 4 with IP address 192.168.1.49? (this is just an example, but if you can help me out, I can take it from there)

Original source