• Select color / colour or B&W printing in vba macro

    Home » Forums » AskWoody support » Productivity software by function » Visual Basic for Applications » Select color / colour or B&W printing in vba macro

    Author
    Topic
    #491788

    I have long had macro buttons in my Word Quick Access Toolbar (and before that in menus) to allow me to quickly print a document in black and white, or in colour. Something like this:

    Sub PrintBW()

    ‘ PrintBW Macro


    ‘Save current printer
    Dim sCurrentPrinterStr As String
    sCurrentPrinterStr = ActivePrinter

    ‘Set printer to black and white printer
    ActivePrinter = “\sethpafil006HP Laserjet 4350 DTN”

    ‘Print document
    Application.PrintOut FileName:=””, Range:=wdPrintAllDocument, Item:= _
    wdPrintDocumentWithMarkup, Copies:=1, Pages:=””, PageType:= _
    wdPrintAllPages, Collate:=True, Background:=True, PrintToFile:=False, _
    PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _
    PrintZoomPaperHeight:=0

    ‘Reset printer to original setting
    ActivePrinter = sCurrentPrinterStr

    End Sub

    This macro was assigned to an icon, next to another similar macro/icon combination for printing using the colour printer.

    I’ve now moved to an office with a single Kyocera TASKalfa 400ci KX printer. This can be set to print in B&W, or in colour – the default is black and white (to save money).

    I have tried recording a macro to select colour printing, and print a document; but the mouse clicks used to select colour printing do not seem to be recorded in the macro.

    Google has not been my friend – perhaps it would help if I could work out what to search for, but searches so far have not got any useful hits.

    Can anybody suggest how to set the printer to print in B&W or in colour using VBA?

    Peter.

    Viewing 0 reply threads
    Author
    Replies
    • #1421304

      It might be worthwhile checking whether setting ‘Options.PrintDraft = True’ kills the colour output.

      Cheers,
      Paul Edstein
      [Fmr MS MVP - Word]

    Viewing 0 reply threads
    Reply To: Select color / colour or B&W printing in vba macro

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

    Your information: