Consulting

Results 1 to 2 of 2

Thread: Multiple spellings for one printer in ActiverPrinter

  1. #1

    Multiple spellings for one printer in ActiverPrinter

    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.

  2. #2
    Knowledge Base Approver VBAX Guru macropod's Avatar
    Joined
    Jul 2008
    Posts
    4,435
    Location
    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.
    Cheers
    Paul Edstein
    [Fmr MS MVP - Word]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •