Stupid question but you did include the AddPrinter UDF in your code right?
If not then you need to add it.

UDF Library AddPrinter() - Add IP,LPT, or COM Printers
KiXtart FAQ & How to's How to use UDFs
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.