ISProfile.GenerateAndPrintLetter

Description

This function generates and prints letters and returns the error message if the exception appeared.

Syntax

object.GenerateAndPrintLetter(aParams)

Part Attribute Type Description
object Required
The object always implements the ISProfile interface
aParams In, Required
The object that defines conditions for loading

Return Value

string

Returns the error message if the exception appeared, otherwise it returns an empty string.

Example

Print the letter for the selected patient and display the printing result.

Dim aPatient 
Dim aParam
Dim aResult

Set aPatient = Profile.SelectPatient
set aParam = Profile.CreateLetterWorkParams
aParam.PatientId = aPatient.Id
aParam.Template = "All Categories\Template 1"

aResult = Profile.GenerateAndPrintLetter(aParam)

Profile.MsgBox("Letter printing result: " & aResult)  
Note:

In Profile Client v8 on User Interface Letters can be found in Organisation > Work Centre > Communication > Letters.

See also

Version information

Added in v7.8.0