This procedure updates the current letter object as stored within Profile.
object.Save
Part | Attribute | Type | Description |
---|---|---|---|
object |
Required | The object always implements the
ISLetter interface |
Prepend the 'Urgent' string to the letter subject if it has not been done before, and display some information about the letter.
Dim aPatient
Dim aLetters, aLetter
Dim i
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 & vbNewLine
for i = 0 to aLetters.Count - 1
set aLetter = aLetters.Item(i)
if InStr(aLetter.Subject2, "Urgent: ") <> 1 then
aLetter.Subject2 = "Urgent: " & aLetter.Subject2
aLetter.Save
aMessage = aMessage & "Letter updated and saved: "
else
aMessage = aMessage & "Letter is already urgent: "
end if
aMessage = aMessage & vbNewLine &_
"Letter Date: " & aLetter.Date & vbNewLine &_
"Letter Subject: " & aLetter.Subject2 & vbNewLine & vbNewLine
next
Profile.MsgBox (aMessage)