Is there a way of changing the port settings of a printer programatically?

i.e a printer is set up with its port being an ip address. I need to be able to change that ip address.

I'm using VB or VBA.

Thanks,
Adam