there is a problem with
beacuse if you exit the loop p3 looses is dataVB Code:
p1 = Printer.DeviceName p2 = Printer.DeviceName & "," & Printer.DriverName & "," & Printer.Port For Each p3 In Printers If Left(p3.DeviceName, 11) = "ElectraSoft" Then Exit For 'p.DeviceName Next SetDefaultPrinter p3.DeviceName 'for windows 9x p4 = p3.DeviceName & "," & p3.DriverName & "," & p3.Port r = WriteProfileString("windows", "Device", p4) 'for XP/NT




Reply With Quote