+ Reply to Thread
Results 1 to 4 of 4

Find Printer Name and Port Windows 10, 8.1, 7

  1. #1
    Registered User
    Join Date
    06-17-2009
    Location
    Canada
    MS-Off Ver
    Office 2010
    Posts
    84

    Find Printer Name and Port Windows 10, 8.1, 7

    Hello all,

    I have need to find the current printer name and port number and change to a different printer and then change it back.
    The code I have listed below works on windows 8.1, Windows 7 and Windows XP, However it does not work on Windows 10. I get an Automation error.

    So I am looking for an alternate way to do this or a work around.


    Please Login or Register  to view this content.
    Please Login or Register  to view this content.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Find Printer Name and Port Windows 10, 8.1, 7

    Hello Epscan,

    This macro code requires you run it with Admin Privileges. In the older systems, this was not an issue. Windows 10 defaults user profiles to standard user. You will need to adjust your access permissions for the WMI service and set the security for the WMI namespace CIMV2.

    If you don't know how, see the last answer in this Post
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    06-17-2009
    Location
    Canada
    MS-Off Ver
    Office 2010
    Posts
    84

    Re: Find Printer Name and Port Windows 10, 8.1, 7

    Thanks for the reply.

    Great to hear from the original author of the code! (works very well)

    Permissions were set correctly.
    We have not resolved the issue totally but I was able to see that a Windows 10 update corrupted something in the WMI. We have had some other unrelated issues with Windows 10 and have reverted back to Windows 7 on this machine. Windows 7 is our company standard, one user always wants to be ahead of the curve.
    Marking as solved as it points us to where the problem was.

    Thanks again.

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Find Printer Name and Port Windows 10, 8.1, 7

    Hello Epscan,

    Ah, Windows 10. Don't you love having a product upgrade forced down your throat? Especially when it works soooo much better than the previous product?

    On a happier note, I am glad you found the problem.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Printer selection problem due to Ne-port numbering
    By jimfx in forum Excel Programming / VBA / Macros
    Replies: 32
    Last Post: 07-08-2021, 10:40 AM
  2. PCL5e Command stream from excel vba to windows printer
    By jjq2r01h in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-07-2014, 09:36 AM
  3. Find or not my printer!
    By e-me in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-23-2007, 07:14 AM
  4. printer port assignment in macro
    By DaveAlbany in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-11-2006, 11:45 AM
  5. [SOLVED] Calling the Windows Deafult Printer
    By Simon Peers in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-24-2005, 05:09 PM
  6. Capturing Data from a Com Port or Printer Port
    By Newby :) in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-19-2005, 09:05 AM
  7. [SOLVED] How do I initiate the windows printer select object in Excel macro
    By Mick B in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-13-2005, 06:06 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1