Does anyone know how to hard code USB printer port in the macro? I have to print on USB printer called "label" , and it is presented in the macro as:
Application.ActivePrinter = "label on Ne06:"
The problem is that "Ne06" can become "Ne08" , "Ne17" or something else if computer is restarted. It is Virtual USB printer port, as seen in Windows Printer settings. It prints always all right, but that Ne thing always changes the number. If you print directly from Excel, there is no problem, but if prints generated by macro, you have to tell macro port name, is this correct? If I would just put
Application.ActivePrinter = "label"
it would not work.
So, my question is : how to overcome this problem?