• ActivePrinter (2003 SP2)

    Author
    Topic
    #426342

    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.

    Viewing 1 reply thread
    Author
    Replies
    • #985151

      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.

    • #985153

      The ancient post 174601 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.

      • #985156

        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.

    Viewing 1 reply thread
    Reply To: ActivePrinter (2003 SP2)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: