ID of the category the letter template is associated with.
object.CategoryID
| Part | Attribute | Type | Description |
|---|---|---|---|
object |
Required | The object always implements the
ISLetterTemplate interface |
int
Display some information about the letter templates, including IDs of the categories the letter templates are associated with.
Dim aPatient
Dim aLetters, aLetter
Dim aTemplateCategories
Dim aCategory
Dim i, j
Dim aTemplatesIds
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
set aTemplateCategories = Profile.LoadLetterTemplateCategories
set aTemplatesIds = Profile.CreateIntCollection
for i = 0 to aLetters.Count - 1
set aLetter = aLetters.Item(i)
set aLetterTemplate = aLetter.Template
if aTemplatesIds.IndexOf(aLetterTemplate.ID) < 0 then
aMessage = aMessage & vbNewLine &_
"Letter Template Information: " & vbNewLine &_
" - ID: " & aLetterTemplate.ID & vbNewLine &_
" - Subject: " & aLetterTemplate.Subject & vbNewLine &_
" - Key Words: " & aLetterTemplate.KeyWords & vbNewLine &_
" - Category ID: " & aLetterTemplate.CategoryID & vbNewLine &_
" - Reason ID: " & aLetterTemplate.ReasonID & vbNewLine
for j = 0 to aTemplateCategories.Count - 1
set aCategory = aTemplateCategories.Item(j)
if aCategory.Id = aLetterTemplate.CategoryID then
aMessage = aMessage &_
" - Category: " & aCategory.Name & vbNewLine
end if
next 'j
aTemplatesIds.Add aLetterTemplate.ID
end if
next
Profile.MsgBox (aMessage)In Profile Client v8 on User Interface Category ID cannot be found.
Letter Template Category can be found in .