Guys,

We have a small project that has a requirement to print a bunch of files to a specified printer. It should be completely free of any user actions.

I searched the board and found the PrintTo() - Print any file to any printer UDF. One problem occurs when doing some testing.

I use the script bellow. An error windows pops up telling me that the test.doc file could not be found. Checked, double checked and even triple checked but the file is definitely there and it is accessible. I used .doc and .txt files but all give the same error. Print and printto actions are specified for these file types.

Code:

Break on

$file = "c:\test.doc"
$printer = "\\server\printer"


PrintTo($file,$printer)
If @error
"ERROR OCCURED:" @serror
EndIf



Any idea WTF is happening?
I've seen some other issues with PrintTo but the solutions offered do not give me any joy.

BTW: I'm running this on a WinXPPro SP2 box but in the end it should run on Win2K Server SP4. Using Kix 4.51.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.