Results 1 to 13 of 13
  1. #1
    New Lounger
    Join Date
    Aug 2002
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    2 printers, toolbar buttons? (Office 2000 SR2)

    Using WinXP platform. WORD 2000. Have 2 printers - Epson photo895(USB port)[for best colour] & Lexmark Z55 (Parallel port)[b/w speed]. Would like to put 2 individual toolbar buttons instead of going through File-Print-choose Printer each time. Any advice on how to do this (and if it's possible) would be welcome. Have tried a macro, but all this does is pick up the current printer. Thanx a lot

  2. #2
    New Lounger
    Join Date
    Jul 2002
    Location
    CALIFORNIA
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: 2 printers, toolbar buttons? (Office 2000 SR2)

    Jefferson,

    I really liked the answer you provided to this question but I am having a problem with the macro. When I execute the macro I am getting a compile error on the second ActivePrinter statement. The error I'm receiving is "Compile Error, Invalid Qualifier" with ActivePrinter highlighted.

    I tried adding Application.ActivePrinter to the macros but it didn't help. The macros did work when I first added them but now this is occuring and I'm stumped.

    Thanks...
    Shaun Hillis

  3. #3
    New Lounger
    Join Date
    Mar 2002
    Location
    Texas, USA
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: 2 printers, toolbar buttons? (Office 2000 SR2)

    Change Step 8 to activedocument.printout instead of activeprinter.printout

    Elaine

  4. #4
    New Lounger
    Join Date
    Aug 2002
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: 2 printers, toolbar buttons? (Office 2000 SR2)

    Answer to your first question 'am I really a grandma?' answer-Yes, in my 70s. Have used computers & Office for over 15 years
    Thank you for your help - have done as suggested, but am getting error message "Compile Error, Invalid Qualifier" with ActivePrinter highlighted.
    Sub PrintToEpson()
    '
    ' PrintToEpson Macro
    ' Macro created 03/09/2002 by Joye Cohen
    '
    ActivePrinter = "Epson Stylus Photo 895 (Copy2) on NE02:"
    ActivePrinter.PrintOut


    End Sub
    Seem to be going wrong somewhere, if as you suggest I put the period (.) AFTER activeprinter.printout - get a syntax error, hate to request help again, but
    grandma_j Thanxx for the welcome

  5. #5
    New Lounger
    Join Date
    Jul 2002
    Location
    CALIFORNIA
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: 2 printers, toolbar buttons? (Office 2000 SR2)

    Elaine,

    Thanks for the answer it did the trick.

    Shaun

  6. #6
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: 2 printers, toolbar buttons? (Office 2000 SR2)

    As Elaine pointed out in a post above, change

    Activeprinter.printout to

    Activedocument.printout
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  7. #7
    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: 2 printers, toolbar buttons? (Office 2000 SR2)

    Whoops! I will fix that right now. <img src=/S/doh.gif border=0 alt=doh width=15 height=15>

  8. #8
    New Lounger
    Join Date
    Aug 2002
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: 2 printers, toolbar buttons? (Office 2000 SR2)

    Thank you so much for all of your help& Elaine's. It works fine now <img src=/S/newbrain.gif border=0 alt=newbrain width=21 height=22>

  9. #9
    Star Lounger
    Join Date
    Aug 2002
    Location
    Orlando, Florida, USA
    Posts
    82
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: 2 printers, toolbar buttons? (Office 2000 SR2)

    Could you dig deeper into this post. What I want to do is create a macro that will tell a document to print from tray 2 of the printer for the first page and tray 3 of the same printer for every page after that. Tray 2 has letterhead in it and tray 3 has regular paper in it. Thanks

  10. #10
    2 Star Lounger
    Join Date
    Jun 2001
    Location
    Quakers Hill, NSW, Australia
    Posts
    153
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: 2 printers, toolbar buttons? (Office 2000 SR2)

    Hi Jefferson,

    I have just found this and set it up OK in Word (2003).
    Thought it would be helpful in Excel (2003) but when I tried using your "Word" instructions I receive a run time error "424".
    Can I set these macros up for printer buttons in Excel?

    Thanks
    Neville

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

    Re: 2 printers, toolbar buttons? (Office 2000 SR2)

    ActiveDocument is not valid in Excel; instead, use ActiveWorkbook or ActiveSheet, depending on whether you want to print all sheets in the active workbook, or just the currently active sheet. So the macros would look like this (with the appropriate name substituted, as described higher up in this thread):

    Sub PrintToEpson()
    Application.ActivePrinter = "Epson Stylus Photo 895 (Copy2) on NE02:"
    ActiveSheet.PrintOut
    End Sub

  12. #12
    2 Star Lounger
    Join Date
    Jun 2001
    Location
    Quakers Hill, NSW, Australia
    Posts
    153
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: 2 printers, toolbar buttons? (Office 2000 SR2)

    Thanks Hans,

    Works great now

    Neville

  13. #13
    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: 2 printers, toolbar buttons? (Office 2000 SR2)

    <P ID="edit" class=small>(Edited by jscher2000 on 22-Oct-07 16:57. Reconstructed lost content; previously edited 9/03/2002.)</P>Are you really a Grandma? Welcome to Woody's Lounge.

    Yes, there is a way to get these two buttons if you are willing to do a tiny bit of macro programming. This is more involved than recording a macro, but it's not as bad as it might sound from the word "programming." Here's what you need to do. I'm going into excruciating detail. If you've done any of this before, or have to do it ever again, you'll find that most of it just rolls off your fingertips like typing your own name. The first time, it might take you five minutes.

    Research Phase: Determine the names that Word recognizes for your printers. These may be different from the "friendly" names that are displayed in the dialog.

    1. <LI>Set up Word to print on one of your two printers. You can do this by opening the Print dialog (File > Print) and then changing the printer, and then closing the dialog (you usually don't actually have the print to make the change stick).

      <LI>In Word, with the print dialog closed again, press Alt+F11 to open the Visual Basic Editor. This can look like a big blank area, or there might be 3-4 windows arranged to fill the screen, or... anyway, whatever it looks like is fine.

      <LI>Press Ctrl+G to open the Immediate Window. This is a special window that lets you send instructions directly to Word.

      <LI>With your cursor in the Immediate Window, type ?activeprinter and press enter.

      <LI>On the next line, you will see what Word calls your printer. It might be something like Lexmark on LPT1: or something else, but usually there will be an "on" in the statement. Either jot this down exactly as it appears, or copy and paste it into a Word document for future reference. (Please ignore the single space before the printer name.)

      <LI>Repeat this process with the second printer.

      <LI>When finished, close the entire Visual Basic Editor (you don't need to close Word).
    Programming Phase: Create two tiny programs that will switch the printer before printing directly to the printer. I am assuming that you don't want to review any settings before printing, such as the Page Setup dialog or the Print dialog. So I'm going to have you enter code to change printers and print immediately without further delay. If you want to see one or both of those other dialogs, you can always change this later.

    1. <LI>In Word, press Alt+F8 to open the Macros dialog.

      <LI>In the text entry area at the top, type something like PrintToEpsonNow. The exact name is not important, but it should, for ease of later reference, include the word Epson! Your name can't contain any spaces.

      <LI>The Create button should be highlighted. Click that, and your old friend the Visual Basic Editor will open up automatically.

      <LI>You will see something like this (obviously with your name, rather than mine in it):
      <pre>Sub PrintToEpsonNow()
      '
      ' PrintToEpsonNow Macro
      ' Macro created 8/31/2002 by Jefferson Scher
      '

      End Sub</pre>

      <LI>On the line that is blank, where your blinking cursor is, type the following:
      activeprinter = "

      <LI>At that point, you need to put in whatever Word recognizes as the name of your Epson printer, based on what you found in the research phase. Follow that with another " (quotation mark).

      <LI>When you press enter, the Visual Basic Editor will indicate that it understands what you want by changing activeprinter to ActivePrinter. If it doesn't like what you've entered, for example, if you leave out a quotation mark, the line will turn red and an error message will be presented. The Visual Basic Editor has no idea whether you've entered a real name for the printer or something completely made up, so if there is an error there, you will find out later when Word tries to change to that printer.

      <LI>Okay, we're nearly done with this. Now, you need to add a line that actually tells Word to start printing. On the new blank line where your cursor is blinking, type the following:
      activedocument.printout

      Now, when you press the period (.), the Visual Basic Editor will usually pop up a list of options. Once you type a few letters of printout, the word Printout should be visible on this list, and you can just arrow down to it and press Tab or Enter to complete your command.

      <LI>If you press Enter or just move your cursor up a line, it should turn into ActivePrinter.PrintOut, indicating that your code is valid.

      <LI>Close the Visual Basic Editor to return to Word.

      <LI>Repeat the above process for your second printer.
    Setting up buttons: Customizing your toolbars. While you can run your print macro by calling up the Macros dialog (Alt+F8), and that's fine to test them, I know you want them to be more handy. Here's how you do it.

    1. <LI>Right-click in an empty area at the right end of the top menu bar or any toolbar. You should see a drop-down menu listing available toolbars, and, at the bottom, the choice to Customize... Click on Customize...

      <LI>Click on the tab labeled Command, and scroll down the list on the left side, about 2/3 of the way, and highlight the word Macros. In the both on the right, you should see something like Normal.NewMacros.PrintToEpsonNow (although, often the very end will be cut off...hopefully you can tell the two of them apart).

      <LI>Click and hold on the name of your macro, and then drag it up to where you want it to be on the toolbar. When you release the mouse, you will get a big ugly button with the full name on it. Don't worry, we'll fix that in a minute. Right now, drag the other macro up there, too.

      <LI>To make an attractive button, right click it and look at your many options. I suggest that you first edit the text to the short name of the printer, such as Epson or Lexmark. You also can use a picture, but since the pictures are so small, it might be best to leave the buttons as text. You can play around with this as much as you want. If it gets messed up beyond all recognition (with a different first word, this forms the basis for the acronym FUBAR that you might see on the Internet), you can drag the button off the bar and start again.

      <LI>When your buttons are done, click the Close button in the Customize... dialog.

      <LI>You're done!
    Now, some people will say you shouldn't customize the built-in toolbars, it is better to create your own. Other will say, not only that, but you should set up Word to re-create the toolbars every time you start the program. Well, maybe they're right, but you can become a purist later; this will work for now.

    Saving your changes: By default, Word did all of the above in your Normal template, a global storage place for macros, styles, AutoText, toolbars and other stuff, that is always present when you run Word. But Word doesn't save the Normal template until you exit the Word program. This means that if Word were to crash, you would have to do all of that again. (gasp) To force Word to save the Normal template right now, you have three options:

    1. <LI>Use File > Exit to close Word. If Word asks whether you'd like to save your changes to the Normal template, say Yes.

      <LI>Use File > Save All. This is a hidden command that appears if you hold the Shift key down when you click the File menu. Pretty strange, hunh? Word is full of little surprises. I think I read about that one in one of Woody's books.

      <LI>Go back to the Visual Basic Editor to save the Normal template. Here you have two options:

      <UL><LI>On the File menu, there should be an option called Save Normal.

      <LI>You can pop up the Immediate Window again (Ctrl+F8) and type normaltemplate.save (a funny thing happens when you type that period, as described above).
    [/list]I hope this gives you the tools you need to get your buttons working. But, if not, please post again!

Posting Permissions

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