Results 1 to 4 of 4
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Wetherby, Yorkshire, England
    Posts
    283
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Change Printer (Word 2000 SP3)

    I have a menu button to change printer in certain circumstances ( for a draft print for example). My code is this:
    ActivePrinter "New Name"
    Printout etc
    ActivePrinter "Default Name"

    This works and resets the printer to default where "Default Printer" is the actual name of the dp. What I would like is a wasy of actually saying go back to the default without using its name ie just default. That way if I schange the default printer I don't have to change the code. I'm sure I've seen it somewhere but I've searched the references and can't find it.

    Anyone know if it's possible and if so how?

    Thanks

    Peter

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Change Printer (Word 2000 SP3)

    <P ID="edit" class=small>(Edited by jscher2000 on 31-Jul-03 12:09. I remembered there was a typo...)</P>Here's a post from last September that is very step by step. There are weird characters in it that were supposed to be HTML "non-breaking spaces" so if you see those, please ignore them. When the Lounge is fully restored to its new home, you can use this link: <post#=174601>post 174601</post#>. Until then... please see the attached.

    Added: the line activeprinter.printout should be activedocument.printout (but you'd figure that out eventually <img src=/S/smile.gif border=0 alt=smile width=15 height=15> )
    Attached Files Attached Files

  3. #3
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Change Printer (Word 2000 SP3)

    To answer your question more directly, simply store the name of the ActivePrinter in a string variable:

    dim strPrinterWas as String
    strPrinterWas = ActivePrinter

    ' your code to set the new printer and print goes here

    ActivePrinter = strPrinterWas

  4. #4
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Wetherby, Yorkshire, England
    Posts
    283
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Change Printer (Word 2000 SP3)

    Thanks.
    I should have thought of that!
    Peter

Posting Permissions

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