I don't have the code with me here, but if I'm not mistaken, instead of changing the device name, I made the printer I wanted to print the default. Then when the form unload, I'd reset the original default printer back.