There's a PrintOut
method in Excel that prints stuff.
It accepts a printer name as a parameter, and that printer name is not just a system printer name, but a combination of both system printer name and port to which the printer is connected.
.PrintOut ActivePrinter:="MyPrinter" & " on " & "Ne00:"
If you only provide a system name, Excel will not find it and will not print.
Note that " on "
piece in the middle. It is actual English word "on" that makes "excel printer name" human-friendly.
The problem is, this little piece is different on each localised version of Excel. Therefore, code that wants to compose true "excel printer name" would need to include a huge switch
where all possible Excel locales would be listed with corresponding translation of "on". I haven't even got such list. But I would like to have it, or to hear about a way to figure out this piece on the fly. The Application.International
property does not seem to contain an answer.