Results 1 to 9 of 9
  1. #1
    3 Star Lounger rcbjr2's Avatar
    Join Date
    Jan 2001
    Location
    Matthews, NC
    Posts
    279
    Thanks
    6
    Thanked 1 Time in 1 Post

    Intercept Print Commands (Word 2000 SR-3)

    I may have asked this before, but because searching is down in the lounge, I need to ask again cause I can't find the original posts. I need to be able to switch prints back to my default when I click the print button on the main toolbar of Word 2000. I thought if I created a macro in the VB editor named FilePrintDefault and included the commands to switch printers and then print, it would work, but what I tried wasn't switching printers. Am I using the write name to intercept the print button? Does the code need to go somewhere special in the VB editor??

    Thx.

    -Rich Belthoff

  2. #2
    Star Lounger
    Join Date
    Jun 2002
    Posts
    98
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Intercept Print Commands (Word 2000 SR-3)

    I'm wondering why the printer is changing to another printer, requiring you to set it back again to the default.
    If you have another macro that is switching the printer for some special job, it should probably reset Word to the default printer when its done doing it's thing.

    Can you tell us what situation is creating this need?
    __________________________________________________ ____
    <img src=/S/nun.gif border=0 alt=nun width=20 height=20> Sister Dory
    Our Lady of Perpetual Help, Holstein Falls, Wisconsin, USA

  3. #3
    3 Star Lounger rcbjr2's Avatar
    Join Date
    Jan 2001
    Location
    Matthews, NC
    Posts
    279
    Thanks
    6
    Thanked 1 Time in 1 Post

    Re: Intercept Print Commands (Word 2000 SR-3)

    It's operator error. I have a regular printer and a color printer. When I use the color printer, I use File Print and manually change the printer. However, the change sticks in Word, so if I forget to change it back to the default printer, when I click the Print button it goes to the color printer. I want the print button to reset the printer to the default in case I inadvertently left it on the color printer.

    Thx.

    -Rich Belthoff

  4. #4
    3 Star Lounger rcbjr2's Avatar
    Join Date
    Jan 2001
    Location
    Matthews, NC
    Posts
    279
    Thanks
    6
    Thanked 1 Time in 1 Post

    Re: Intercept Print Commands (Word 2000 SR-3)

    By the way, I've also tried putting ActivePrinter = "HP LaserJet 4050 Series PCL" into AutoNew(), AutoOpen(), and AutoClose() so that after I print a color file or open a B&W file the printer will get switched, but it's not switching after opening or closing a file. It stays on the color printer in File, Print. So, I may be using the right commands, but for some reason they are not being implemented.

    Thx.

    -Rich Belthoff

  5. #5
    3 Star Lounger rcbjr2's Avatar
    Join Date
    Jan 2001
    Location
    Matthews, NC
    Posts
    279
    Thanks
    6
    Thanked 1 Time in 1 Post

    Re: Intercept Print Commands (Word 2000 SR-3)

    An update: forget my comment AutoNew() not working. I exited and re-started Word, and now it works. I'd still like to be able to do it with the Print button as well, though.

    Thx.

    -Rich Belthoff

  6. #6
    Star Lounger
    Join Date
    Jun 2002
    Posts
    98
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Intercept Print Commands (Word 2000 SR-3)

    Yikes! You are brave. I'd avoid all that AutoOpen stuff. That's how baby "macro viruses" are conceived. <img src=/S/nope.gif border=0 alt=nope width=15 height=15>

    You can customize your toolbar. Add two new buttons: one for color printing, one for B&W.
    First, make your two macros, then add the buttons to your toolbar.
    Right-click the toolbar, Customize, Commands, Categories=Macros, drag macro name to the toolbar.
    Right-click the existing Print button and "Copy Icon" and paste it onto your 2 new buttons.
    Edit the icon image for your color print button so you can add some snazzy color to it.

    Here's a sample macro to assign to the color printer button:

    <pre>Sub ColorPrint()
    ActivePrinter = "Color Printer X100"
    Dialogs(wdDialogFilePrint).Show
    ActivePrinter = "HP Laserjet"
    End Sub</pre>

    Then pull off the old default Print button from the toolbar. Just use your customized buttons for printing. Note that it doesn't actually send anything to print. Just displays the Print dialog. I like to have a chance to select what pages to print, or how many copies I want.
    __________________________________________________ ____
    <img src=/S/nun.gif border=0 alt=nun width=20 height=20> Sister Dory
    Our Lady of Perpetual Help, Holstein Falls, Wisconsin, USA

  7. #7
    3 Star Lounger rcbjr2's Avatar
    Join Date
    Jan 2001
    Location
    Matthews, NC
    Posts
    279
    Thanks
    6
    Thanked 1 Time in 1 Post

    Re: Intercept Print Commands (Word 2000 SR-3)

    I hadn't thought of two buttons. I might try that.

    Thx.

    -Rich Belthoff

  8. #8
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Intercept Print Commands (Word 2000 SR-3)

    Hi Rich:
    Unfortunately, the search engine at the Lounge is down. Fortunately, I kept track of <post#=174601>post 174601</post#> by Jefferson Scherr that addresses the question.

    By the way, AutoOpen etc. macros are used all the time without any problems. It's just that macro viruses may also use the a similar technique.

  9. #9
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Intercept Print Commands (Word 2000 SR-3)

    I don't like modifying built-in stuff unless absolutely necessary.

    One way to approach this, the mthodology of which would apply to most any built-in stuff is to:

    1. Have the AutoExec macro set up Word's environment when Word starts.
    2. Have the AutoExit macro reset whatever when Word closes.
    3. As needed, use AutoOpen, AutoNew and AutoClose.
    4. Use a toolbar/menu to set/restore/toggle whatever during the Word session.

    I don't like to modify the built-in stuff because as I get get older, I have less gray matter, I may forget and have unpleasant side-effects.

Posting Permissions

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