maybe its just me but i dont know what your script is or trying to do, it looks like you only posted parts of it. please post your entire script... i'm guessing it has something to do with printers..
also this line looks wrong:
Set objApp = GetObject(,"XYZ.Application")
shouldn't have the , should be: Set objApp = GetObject("XYZ.Application")