Probably there are spaces in the Printer name. Try to set the default printer first:
oWSHNet = CREATEOBJECT('Wscript.Network')
oWSHNet.SetDefaultPrinter('WindowsPrinterName')
=ShellExecute(0, "Printto", @lc_file, "", 0,1)
Also:
=ShellExecute(0, "Printto", @lc_file, ["]+SET('PRINTER', 3)+["], 0,1)
Double quotes " only work.
>I'm trying to get ShellExecute to print to a specific. My code is
>
>lc_filt = GETFILE('doc')
> =ShellExecute(0, "Printto", @lc_file, SET('PRINTER', 3), GETENV('TMP'), 5)
>
>
>But depending on the printer that was selected Word returns "Run-time error '1120'. There is a printer error."
>
>Anybody have success with the printto in shellexecute?