actually, the delprinterconnection and addprinterconnection lines need changing too but the code itself works just fine and is a fit for your situation.
_________________________
!

download KiXnet