Results 1 to 4 of 4
  1. #1
    lsander
    Guest

    Macro for Printer Properties (Word 2000 SR1)

    I have an EPSON Stylus C80 printer, and I want an easy way to change its properties from B&W to Photo mode. This takes several clicks in the printer's Properties box. Ideal for me would be to have a macro on my toolbar that would change the properties, but Word won't let me record a macro that affects the EPSON properties box. I'd be willing to have two instances of the printer, one with each set of properties, but I don't know if that can be done, let alone how to do it.

    Any ideas?

  2. #2
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts

    Re: Macro for Printer Properties (Word 2000 SR1)

    Hi,

    The VBA Help for the Printout method gives the following syntax:

    expression.PrintOut(Background, Append, Range, OutputFileName, From, To, Item, Copies, Pages, PageType, PrintToFile, Collate, FileName, ActivePrinterMacGX, ManualDuplexPrint, PrintZoomColumn, PrintZoomRow, PrintZoomPaperWidth, PrintZoomPaperHeight)

    Similarly, the arguments listed as available for the built-in FilePrint dialog are:

    Background, AppendPrFile, Range, PrToFileName, From, To, Type, NumCopies, Pages, Order, PrintToFile, Collate, FileName, Printer, OutputPrinter, DuplexPrint, PrintZoomColumn, PrintZoomRow, PrintZoomPaperWidth, PrintZoomPaperHeight

    - you can't get to the kind of printer properties you need to get to in this case, via VBA, presumably because these properties can be so different from printer to printer.

    It may be possible to get to these other printer properties via APIs, but if is, I don't know how so can't tell you!

    If you can set the printer properties that you need, in the Word environment, using the keyboard only, then you should be able to create a macro to do it using the SendKeys method. For example, with my dinky old HP inkjet, to open the print dialog, go to Properties, set the quality to Best and the output to Color, and then print, I'd use the following keystrokes:

    Control+P
    Alt+P
    Alt+B
    Alt+O
    Enter
    Tab 10 times
    Enter

    And a macro do reproduce these keystrokes would look like:

    Public Sub SetPrintPropsViaKeystrokes()
    'Note: this only works for an HP 810C printer;
    'other printers would require different keystrokes
    SendKeys "(^p)"
    SendKeys "(%p)"
    SendKeys "(%B)"
    SendKeys "(%o)"
    SendKeys "{ENTER}"
    SendKeys "{TAB 10}"
    SendKeys "{ENTER}"
    End Sub

    Of course YKMV (your keystrokes may vary) - you can get more details by checking out the SendKeys VBA help topic.
    You'd probably need two macros

  3. #3
    lsander
    Guest

    Re: Macro for Printer Properties (Word 2000 SR1)

    Thanks! I'll try it.

    I cut my teeth on macros for Word 3.0 (or so) for DOS, when EVERYTHING in a macro was "sending keys." I've worked reasonably much with the newer macros, and I've been lamenting the demise of the simple "send a keystroke" concept. Looks like it's not dead, but merely transmogrified into SendKeys.

  4. #4
    Lounger
    Join Date
    Oct 2001
    Location
    Minnesota, USA
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macro for Printer Properties (Word 2000 SR1)

    I have managed to save different settings for the same printer by adding the original printer as a second printer, then changing the settings through the printer properties, and changing the printer name to reflect what the settings will do. Then it is just a matter of deciding how to access it, through the printer dialog box, a macro, or a toolbar button.

Posting Permissions

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