ISLetterTemplate.PublishSystemCode

Description

The code of the publish system to which letters based on this template are usually published.

Syntax

object.PublishSystemCode

Part Attribute Type Description
object Required
The object always implements the ISLetterTemplate interface

Return Value

ISShortCode

Example

Display some information about the letter templates, including the descriptions of the publish systems.

Dim aPatient
Dim aLetters, aLetter
Dim i
Dim aTemplatesIds
Dim aPublishSystemCode
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 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
    set aPublishSystemCode = aLetterTemplate.PublishSystemCode
    if aPublishSystemCode is nothing then 
      aMessage = aMessage & "    The publish system code is not defined" & vbNewLine
    else
      aMessage = aMessage & "   - The Publish System Code: " & aPublishSystemCode.Description & vbNewLine
    end if    
    aTemplatesIds.Add aLetterTemplate.ID 
   
  end if  
 
next    
Profile.MsgBox (aMessage) 
Note:

In Profile Client v8 on User Interface Publish System can be found in Maintain > Templates > Documents > Open the document > Information and Recipients > Publish > Usual Sys field.

Version information

Added in v7.8.0