Visual Basic > Visual Basic Forums > Visual Basic Power Packs > Printer Name in ActivePrinter
Ask a questionAsk a question
 

AnswerPrinter Name in ActivePrinter

  • Tuesday, October 20, 2009 5:28 AMRoger Chen _ WORLD PEACE Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Dim objApp As Application = new Application ()

    ok --> objApp.ActivePrinter = "\\192.168.11.11\hp LaserJet 1300 PCL 5e on Ne01"
    error --> objApp.ActivePrinter = "\\192.168.11.11\hp LaserJet 1300 PCL 5e"
    i pickup Printer name in PrinterSettings.InstalledPrinters.Item() ,
    and these pickup item seems short " on Nexx" .

    so now , how can i get the printer name ends with " on Nexx"
    or say that how to get the correct printer name which objApp.ActivePrinter can accept.

Answers

  • Tuesday, October 20, 2009 9:31 PMshoagMSFTMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hi Roger,

    Are you looping through the InstalledPrinters collection and picking up the string? - Seems like that should work.

    BTW, this doesn't seem to be related to the PrintForm or Printer object in the Power Packs - you might have better luck asking your question on the Windows Forms forum.

    Hope this helps,
    Steve Hoag Microsoft aka the V-Bee

All Replies

  • Tuesday, October 20, 2009 9:31 PMshoagMSFTMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hi Roger,

    Are you looping through the InstalledPrinters collection and picking up the string? - Seems like that should work.

    BTW, this doesn't seem to be related to the PrintForm or Printer object in the Power Packs - you might have better luck asking your question on the Windows Forms forum.

    Hope this helps,
    Steve Hoag Microsoft aka the V-Bee