The content of the letter template.
object.Content
Part | Attribute | Type | Description |
---|---|---|---|
object |
Required | The object always implements the
ISLetterTemplate interface |
string
Display some information about the letter templates, including their contents.
sub main()
Dim aPatient
Dim aLetters, aLetter
Dim i
Dim aLetterTemplate
Dim aMessage
Set aPatient = Profile.SelectPatient
set aLetters = aPatient.GetLetters (1) ' slcfWordRTF
aMessage =_
"The number of the letters of the selected format is " & aLetters.Count
for i = 0 to aLetters.Count - 1
set aLetter = aLetters.Item(i)
set aLetterTemplate = aLetter.Template
aMessage = aMessage & vbNewLine &_
"Letter Date: " & aLetter.Date & vbNewLine &_
"Letter Subject: " & aLetter.Subject2 & vbNewLine &_
"Letter Template ID: " & aLetterTemplate.ID & vbNewLine &_
"Letter Template Content: " & vbNewLine &_
RemoveEmptyLines( Profile.Rtf2Plain(aLetterTemplate.Content) ) & vbNewLine
next
Profile.MsgBox (aMessage)
end sub
function RemoveEmptyLines(aText)
Dim aPrevText
do
aPrevText = aText
aText = Replace(aText, VbNewLine & VbNewLine, VbNewLine)
loop while aText <> aPrevText
RemoveEmptyLines = aText
end function
In Profile Client v8 on User Interface Content can be found in
.