Change Printer Action

Declaration

<AMCHANGEPRINTER PRINTER="text">

 

See Also

    Change Printer Action-Setting Properties, Print Action, Empty Recycle Bin Action

Description

Changes the default printer. Be aware that some applications check for the default printer on start up, so simply using this action may not change the default printer for applications that are already running. In this case you may need to restart the application.

Practical Usage

Used to change the default printer before printing a document. To insure reliable operation this action should be used before the application that will be used to print is started. To do this use the Run action <AMRUN>. This is because many applications only check for the default printer on startup - so changing the default Windows printer while the application is running could have no effect.

Parameters

General Tab

Printer

Text, Required
MARKUP: PRINTER="HP LaserJet 6000"

Specifies the name of the printer device that should become the new default printer. The printer must exist on the target system at runtime.

Notes

Change Default Printer Before Starting Applications

To insure reliable operation this action should be used before the application that will be used to print is started. This, because many applications only check for the default printer on startup - so changing the default Windows printer while the application is running will have no effect.

Custom Description

This action includes the Description tab for entering a custom step description.

More on setting custom step description

Standard Error Handling Options

This action also includes the standard Error Causes and On Error failure handling options/tabs.

More on Error Handling Options

Variables and Expressions

All text fields allow the use of expressions, which can be entered by surrounding the expression in percentage signs (example: %MYVARIABLE%, %Left('Text',2)%). To help construct these expressions, you can open Expression Builder from these fields by pressing F2.

More on variables
More on expressions

More on the expression builder

Example

NOTE: The code below can be copied and pasted directly into the Steps pane of the Task Builder.

<AMCHANGEPRINTER PRINTER="Epson Stylus">