MSI Factory 2.3

File.Print

File.Print

This is the first topic This is the last topic  

File.Print

This is the first topic This is the last topic  

OverviewExamples

File.Print (

string Filename )

Example 1

File.Print(_SourceDrive.."\\catalogue.pdf");

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

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


Learn More: Indigo Rose Software - MSI Factory - Buy Now - Contact Us