I've been trying to use the Printto() UDF with no success. Lonkero mentioned a while back that he was having problems as well in this post.
Here is my code:
Code:
$file="%userprofile%\desktop\test.rtf"
$printer="\\computername\printername"
if exist($file)
printto($file,$printer)
? @error
? @serror
else
? "Invalid File/Path"
endif
function PrintTo($_file,$_printer)
dim $,$_
$_=split($_file,"\")
if ubound($_) $_file=$_[ubound($_)] endif
$_[ubound($_)]=""
$_=join($_)
$=createobject("shell.application")
$.ShellExecute($_file, $_printer, $_, "printto", 0)
exit @error
endfunction
When I run the script I get:
Quote:
0
The operation completed successfully.
But nothing prints. I am using XP SP1 and tried both KiXtart 4.20 and 4.22.
Any ideas?
_________________________
(... better days ahead)