Print

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. 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.

Declaration

<AMPRINT FILE="text" />

- or -

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

Example

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

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

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

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

See Also: Change Printer, Empty Recycle Bin, End Process, Get Process Information, Get Volume Information, Log Event, Registry, Run, Set Date and Time

General Tab

Property

Type

Required

Default

Markup

Description

Document

Text

Yes

(Empty)

a)FILE="C:\folder\readme.txt"

b)FILE="C:\folder\report.doc"

The document that should be printed. AWE 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.

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.