Print Action Icon

Print

Declaration

<AMPRINT FILE="text" />

OR

<AMPRINT FILE="text" PRINTER="text (printer name)" />

See Also

Change Printer | Display | Empty Recycle Bin | End Process | Get Process Information | Log Event | Print | Registry | Run

Print Action Icon

Printer - Print Document

Declaration

<AMPRINT FILE="text" />

OR

<AMPRINT FILE="text" PRINTER="text (printer name)" />

See Also

Printer - Set Default Printer | Printer - Get Printer | Printer - Change Printer  | Printer - Print Document | Registry | Run | Empty Recycle Bin

Description

Prints the document specified using the default printer or optionally, using a specific printer. The document must have an application associated with it that can perform printing externally such as Notepad for .TXT files, or a word processor for .DOC files.

Practical Usage

Used to instruct an application to print a document. It is similar to right-clicking on a file in explorer and selecting print. The application must support printing in this manner.

Parameters

General Properties

Property

Type

Req'd

Default

Markup

Description

Document

Text

Yes

(Empty)

  1. FILE="C:\folder\readme.txt"

  2. FILE="C:\folder\report.doc"

The document that should be printed. AutoMate will look up the application that is associated with the specified file and request that it prints the document. The application must support printing in this manner.

Use default printer

Text

No

Enabled

null

If enabled, specifies that the default printer will be used to print the document. This option is enabled by default. This is a design-time parameter used interactively during  construction mode, thus, contains no markups.  

Use specific printer

Text

No

Disabled

PRINTER="Brother MFC-9840C"

If enabled, specifies the name of the printer that should be used to print the document.

Print on all available printers

Text

No

Disabled

PRINTER="allavailable"

If enabled, specifies that the document will be printed on all available printers.  

Description Properties

The Description tab allows you to customize the text description of any step as it appears in the Task Builder's Steps Pane.

More on setting custom step description

Error Causes Properties

The Error Causes tab properties lets you instruct a task step to react only to specific errors or ignore certain errors that should cause it to fail.

More on Error Causes properties

On Error Properties

The On Error tab properties lets you determine what the task should do if a particular step encounters an error as defined in the Error Causes properties.

More about On Error properties

Additional Notes

Expressions, Variables & Functions

A percent sign is used as a special character in AutoMate to indicate the beginning and end of an expression. This allows variables, functions and other expressions to be entered in any text parameter of a task's properties. For example: %1+1% inside a task will resolve to 2 at runtime. A more elaborate example is %FileDateTime(myFile)% which results to the date/time of myFile. To help construct expressions, you can open Expression Builder by clicking the Insert Expression (%) button or by pressing F2.

More on expressions

More on variables

More on functions

More on extended functions
More on the expression builder

Example

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

 

Sample 1 - Print an Excel file on a specific printer.

 

<AMPRINT FILE="C:\Temp\Book1.xlsx" PRINTER="Brother MFC-9840CDW Printer" />

 

 

Sample 2 - Print a Word document on all available printers.

 

<AMPRINT FILE="C:\Documents\FAQs\faq.doc" PRINTER="allavailable" />

 

↑ Top of Page