And this works using "printto"...
Code:
funPrintByExtension("foo.txt","\\SGBUKLHD2K001\HMIUKLHDPR201")

Function funPrintByExtension($sFileName,$sPrinter)
Dim $oShell
$oShell=CreateObject("Shell.Application")
$oShell.ShellExecute($sFileName,$sPrinter,"","printto",1)
If @ERROR "Error in open: "+@ERROR+": "+@SERROR+@CRLF Exit @ERROR EndIf
EndFunction