George
Tried the code VFUG - worked fine.
However I need to select the Eltron printer from a long list of printers on the network before setting it as the default eg
clear
onet=createobject("WScript.Network")
lcdefault=SET("PRINTER",2)
store getprinter() to rpr
onet.setdefaultprinter(rpr)
set printer on
FOR X=1 TO 10
? "aaaaaaaa!"
NEXT
SET PRINTER OFF
SET PRINTER TO
onet.setdefaultprinter(LCDEFAULT)
However the getprinter command fouls up the works and although the default printer is changed, I cant print anything to it. In fact I have to come out of VFP to rectify the situation. Any ideas.
Thanks a lot.
Colin Northway
Specialist in Advertising, Marketing, especially Direct Marketing
I run courses in Business Management and Marketing