Printer - Set default printer
Declaration
<AMPRINTER ACTIVITY="set" PRINTER="text" />
Description
Sets the default printer. For convenience, this activity will display the name of the printer that is currently set to default.
Practical usage
Used to set a specific printer as the default printer usually before printing a document. Be aware that some applications check for the default printer upon startup, so changing the default printer while the application is running could have no effect. In this scenario, you may need to restart the application.
Parameters
General
Property | Type | Required | Default | Markup | Description |
---|---|---|---|---|---|
Set default printer to | Text | Yes | (Empty) | PRINTER="printerName" | The name of the printer to be set as the default printer. |
Example
- Copy and paste the sample AML code below directly into the Task Builder Steps Panel.
- To successfully run the sample code, update parameters containing user credentials, files, file paths, or other information specific to the task to match your environment.
Description
This sample task sets the default printer as \\SALES\Brother MFC-9840CDW Printer.
<AMPRINTER ACTIVITY="set" PRINTER="\\SALES\Brother MFC-9840CDW Printer" />