File.Print

File.Print ( 

string Filename )

Example 1

File.Print(SessionVar.Expand("%AppFolder%\\catalogue.pdf"));

Prints the file "catalogue.pdf" located in the application folder with the user's default viewer for PDF files (probably Acrobat).

Note: In order to expand the session variable %AppFolder% in an action, the action SessionVar.Expand must be used.

Example 2

File.Print("C:\\instructions.doc");

Prints "C\instructions.doc" with the user's default viewer for DOC files (probably Word).

Example 3

-- Print the specified file.
File.Print(_TempFolder.."\\MyFile.pdf");

--Check to see if an error occurred.
error = Application.GetLastError();

-- If an error occurred, display the error message.
if (error ~= 0) then
    Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
end

Prints the file "MyFile.pdf" located in the user's system Temp folder with the user's default viewer for PDF files (probably Acrobat). If the action fails, the error code message is displayed in a dialog message.

See also:  Related Actions