PDA

View Full Version : Multiple spellings for one printer in ActiverPrinter



whatrudoingd
06-19-2012, 05:49 AM
My company uses a macro to select a networked printer and a certain tray in Word 2010. The printers are installed with a UNC of either:
\\SERVERNAME\Printer
or
\\Servername\Printer

I receive a Error 5216 if the spelling in the macro does not match that of UNC installed. How do I tell the macro to use either "this one" or "that one"?


Thank you for any help.

macropod
06-22-2012, 09:01 PM
You could loop through all of the available printers, convert each name to upper case, then compare that against an uppercase representation of the name you're after. Once you have a match, capture the correct format and exit the loop.