Results 1 to 4 of 4

Thread: set printer as standard

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2001
    Location
    Munic
    Posts
    178

    set printer as standard

    hi all,

    how can i set a printer as standardprinter if i have a printercontrol (dim xyz as printer) ???

    cu
    kreuzfeld

  2. #2
    jim mcnamara
    Guest
    Change default printer:

    NT & Win2K:

    http://www.mvps.org/vbnet/code/system/defprinternt.htm

    A class module for Win9X & nt is attached

  3. #3
    Randalf the Red honeybee's Avatar
    Join Date
    Jun 2000
    Location
    off others' brains
    Posts
    4,345

    Well ...

    To set a printer as the default printer, all you have to do is use the Printer object in VB and set it to the printer you like.

    For e.g. if you have a printer named HP, then you could code it like this:

    Set Printer = Printers("HP")

    Of course it does not have error checking and all, but that's how you can set the HP to be the default printer.

    .
    I am not a complete idiot. Some parts are still missing.
    Check out the rtf-help tutorial
    General VB Faq Thread
    Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink!
    Get more power for your floppy disks. ; View honeybee's Elite Club:
    Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
    And if that response was mine, please think about giving me a rep. I like to collect them!

  4. #4
    jim mcnamara
    Guest
    Doesn't work reliably for some older VB. See MSDN article

    http://support.microsoft.com/default...;EN-US;q167735

    This is the general suggested way to set the default printer, not just for the VB session, changes the default printer, not what VB thinks is the default printer for right now.

    http://support.microsoft.com/default...;en-us;Q266767

Posting Permissions

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



Click Here to Expand Forum to Full Width