Home | Tips | Library | Other Authors | Other WP Sites | Writer's Links | Contact | Site Map | Donate

Barry MacDonnell's
Toolbox for WordPerfect

Macros, tips, and templates for Corel® WordPerfect® for Windows®
© Copyright 1996-2017 by Barry MacDonnell. All Rights Reserved.

Page updated May 17, 2016

WordPerfect Tips
Main tips page | Browse tips

How to quickly change printers (in WP8+) back to the default after printing to a different printer or faxing the document.

See also:

"Print your letterhead page from one printer tray, and second and subsequent pages from another tray."

The Windows default printer is the one that shows in File, Print when you open WordPerfect.

However, if you select a different printer (or a fax driver) for temporary purposes then the new selection will be retained and might even be saved with the document. This is by design. From 2Trays.html:

WordPerfect "remembers" the last printer used -- but just for the current session if you have enabled [which is the program default] "Reformat documents for the WP default printer on open" in Tools, Settings, Environment and you are using a printer different from the one set in Windows as the default. Hence, if you have more than one printer you might need to select another printer prior to a new print job. [For more on that setting see here.]

So if you want to use a different printer (or fax driver), print (or fax) the document, and quickly restore the setting to your preferred (default) printer after printing, here are some ways to do it.

Basically, there are several situations where you might need to switch the program's output to a different tray or to a different device:

•  Situation 1:  Same document -> same printer, but output for specified document sections sent to a different tray or feed slot.


See "Print your letterhead page from one printer tray, and second and subsequent pages (or envelopes) from another tray or slot" here. This includes "How WordPerfect 'talks' to your printer's trays and manual feed slot (i.e., the functions of WordPerfect's Page Setup dialog)" and other topics.

The main takeaway from that page is that WordPerfect does not use the tray (or slot) specified in the printer's [Properties] settings (if it did it could not mix various paper sizes/types in a document); rather, it uses its own page definitions to control the printer, which you can specify in the document itself.

Hence it is worth reading that material in order to use the program as it was designed.

•  Situation 2:  Same document -> different printer (or fax driver) for all output.

For example, you might want to fax the entire document directly from your computer (or print it to a PDF driver) but you want the program to automatically return its settings to the current physical printer when you are done rather than retain the temporary output selection as the "default" in File, Print. (Note that this is not an issue with File, Publish to PDF since using WordPerfect's PDF feature is smart enough to return to your physical printer.)


See this thread  on WordPerfect Universe. It demonstrates a couple of macros using the example of printing an envelope to a separate envelope printer. [The macro code there can be copied into WordPerfect; see here for instructions.]

Or see the final download post here by frequent contributor Klaus Pfeiffer for the ready-to-use expanded version of the macro found on the above WordPerfect Universe thread. It can be used to switch temporarily to a different printer or fax driver, then return the File, Print setting to the original printer. It has several options you can choose at print time.

[There's an old alternative macro to print the document to a different printer: See Footnote 1.]

•  Situation 3:  Same document -> part of output to current printer, part to a different printer.

For example, you might want to print a section of the document to a dedicated printer that prints on special paper, and print the other section to the currently selected printer.

Below is a macro to do it.


¤  To copy the macro code into your WordPerfect program to create a working macro, see here.

¤  You will need to replace the two "dummy" printer names in the macro code and enter the exact, case-sensitive names of the two printers in the two commands in the top section of the code (shown in bold).

¤  The macro displays two small dialogs to ask for the first page number and last page number of the section to print to the alternate printer, then it prints the chosen pages to the first printer named in vPrinter1 below, then it prints the rest of the document to the printer named in vPrinter2.

¤  If you wish to print only the first page to the alternate printer, enter a "1" (without quotes) in both dialogs.

¤  There is very little error-checking done such as ascertaining the printers are available, etc. The macro below is merely designed to illustrate some basic steps. Test it with a small document to see how it works.

// Macro begins here

// Display messages if needed -
If(?Substructure or ?GraphicSelected)   
    MessageBox(;"Not At Main Edit Screen";
    "This macro can be started only from the main editing screen."+vHRt+
    "Exit from any header, footer, footnote, text box, graphic,"+vHRt+
    "WordPerfect comment, etc., and play the macro again.";IconStop!)
    MessageBox(;"Current Document is Blank";
    "This macro requires text that can be processed.";IconStop!)

// Store name of current "default" printer for the document:

// Specify your two printers by name:
// (Note: use the EXACT case-sensitive name from File>Print)
vPrinter1:="EPSON Stylus C80 Series"
vPrinter2:="HP LaserJet Professional P 1102w"

// Get the total number of physical pages:

// Print the first page(s) to the first specified printer:
GetNumber (vStartNumb;
    "Enter the START page number (only)"+vHRt+
    "to print to "+vPrinter1; "For PRINTER #1 -")
        Messagebox(;;"You must enter a positive number")
PrintRangeFrom (Page: vStartNumb)
GetNumber (vEndNumb;
    "OK, macro will start printing with page "+vStartNumb+"."+vHRt+
    "Now enter the END page number"+HRt+
    "to print to "+vPrinter1; "For PRINTER #1 -")
        Messagebox(;;"You must enter a positive number")
PrintRangeTo (Page: vEndNumb)
PrinterSelectByName (PrinterName: vPrinter1)
PrintCopies (1)
PrintAction (MultiplePages!)
Print ()
Wait(10)  // (10 = 1 second)

// Print the remainder of the document with the second specified printer:
PrinterSelectByName (PrinterName: vPrinter2)
PrintRangeFrom (Page: vEndNumb+1)
PrintRangeTo (Page: vLastPage)
PrintCopies (1)
PrintAction (MultiplePages!)
Print ()

// Restore printer to original selection:
PrinterSelectByName (PrinterName: vCurrentPrinter)
// Macro ends here

Footnote 1

Older alternative (continued from above):

Below is a macro solution based on the FAXIT macro in the Library.


[1] Select and Copy all of the following lines of macro code.
[2] Open a new document in WP8 or later version and click Tools, Macro, Macro toolbar.
[3] Move the cursor to the very bottom of the blank document after all codes.
[4] Paste the copied material with Edit, Paste Special, Unformatted text.
[5] Make the change to your printer driver's name as indicated in the code below.
[6] Click the Save & Compile button on the macro toolbar. (Done!)

You can add a toolbar button to play this macro: see here.

// (Macro code begins)

OnCancel(End@) OnError(End@) vPrinterName:=""

// Check if the document is empty:
If (?DocBlank)
    MessageBox (; "Document is Blank"; "You can't print or fax a blank document"; IconExclamation!) Quit

// Exit from any header, note, text box, etc.:
While (?Substructure)
If ((vSubDoc=10) or (vSubDoc=11))
BoxEnd (Save!)

// Change "Your New Printer" to the exact name
// of the printer or fax driver you want to switch to as shown
// in File, Print (but retain the double quote marks):

vPrinterName := PrinterSelectbyName ("Your New Printer")

PrintCopies (NumberOfCopies: 1)
Print (FullDocument!)  // (or, CurrentPage!)
PrinterSelectbyName (vPrinterName)

// The last command above will return the setting to your
// preferred default after the document is printed or faxed.

// (End of macro code)