I got the return of the error working using your code. Thanks Sergey! It was returning '53 network path no found.' Testing, I've since determined that the printername passed to copyfile has to be the sharename "\\NCSERVER\HP_4000" and not the windows printer name: "\\NCSERVER\HP LaserJet 4000 Series PCL 6"
Now I have to figure out a way to determine the share name of the printer based on the windows printer name. It turns out that the Okidata windows name and share name were identical but not the same with the laserjet. Any ideas? In my VFP app they choose a printer based on getprinter() which returns the window printer name . I will now need to determine if it is a local printer, a port, or get the sharename for the printer....hmmmm
.·*´¨)
.·`TCH
(..·*
010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"