Results 1 to 4 of 4
  1. #1
    4 Star Lounger
    Join Date
    Jun 2003
    Location
    Utah, USA
    Posts
    406
    Thanks
    35
    Thanked 5 Times in 5 Posts

    ActivePrinter (2003 SP2)

    I have some macros that send jobs to different printers. They use the ActivePrinter statement to send jobs to remote locations on our network.

    Is there an easy line to add to the end of those macros that will reset the target printer to the one right next to me (my Windows default printer). I'm confused how to do this because the ActivePrinter statement I see uses a network address, but the machine attached to my PC would not have such an address.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: ActivePrinter (2003 SP2)

    Take a look at the Printers and Faxes control panel to see what the exact name of the printer is. Use that in the code.
    Alternatively, you can record a macro in which you select File | Print..., set the printer to an arbitrary printer then back to the local printer. You can then close the Print dialog without printing. The recorded macro will contain the instruction you need.

  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: ActivePrinter (2003 SP2)

    The ancient <post#=174601>post 174601</post#> has some tips on printer names that might be relevant. See Research Phase.

    There probably is a way using the Windows API (or maybe the Windows Script Host) to determine the "system default printer" and reset Word to that at the end of a custom print macro. But it has been too long since I've looked at that, so I can't refer to any particular function to use.

  4. #4
    4 Star Lounger
    Join Date
    Jun 2003
    Location
    Utah, USA
    Posts
    406
    Thanks
    35
    Thanked 5 Times in 5 Posts

    Re: ActivePrinter (2003 SP2)

    Thanks guys.

    HansV's suggestion was what I was doing, and it should have worked. There must be some difference I'm missing from what the comment by Jscher brought up. That worked like a charm.

Posting Permissions

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