ISMessageRecipient.Typ

Description

The type of the recipient.

Syntax

object.Typ

Part Attribute Type Description
object Required
The object always implements the ISMessageRecipient interface
Restriction: This property is readonly.

Return Value

ISMessageRecipientType

Example

Add a new message and display its text, subject, recipients and their types.

sub main()
  Dim aMes
  Dim aPatient
  Dim aProvider
  Dim aExProvider

  Set aMes = Profile.CreateMessage
  aMes.Text = aMes.AddText("Hello! Come to my birthday party!")
  aMes.Subject = "Birthday party"
  set aRecipients = aMes.Recipients    
 
  set aPatient = Profile.SelectPatient
  if aPatient.Email <> "" then aRecipients.AddPatient(aPatient)
  
  set aProvider = Profile.LoadProvider("MM")
  if aProvider.Email <> "" then aRecipients.AddProvider(aProvider)
 
  set aExProvider = Profile.LoadExternalProvider("MILLEJ")
  if aExProvider.Email <> "" then aRecipients.AddExternalProvider(aExProvider)
  
  aRecipients.AddCustom "James Bond <007007007@007007007.007007007>"  
  
  aMes.Send
  
  Profile.MsgBox("The message was successfully sent." & vbNewLine &_
    GetMessageInfo(aMes))
end sub

function GetMessageInfo(aMessage)
  Dim aInfo
  Dim aMessageRecipients
  Dim aRecipient
  Dim i

  aInfo = "Subject: " & aMessage.Subject & vbNewLine &_ 
    "Text: " & aMessage.Text & vbNewLine
     
  set aMessageRecipients = aMessage.Recipients
  for i = 0 to aMessageRecipients.Count - 1
    set aRecipient = aMessageRecipients.Item(i)
     
    select case aRecipient.Typ
      case 0
        aTypeAsStr = "Patient"
      case 1
        aTypeAsStr = "Provider"
      case 2
        aTypeAsStr = "ExtProvider"        
      case 3
        aTypeAsStr = "Custom"
      case else
        aTypeAsStr = "Unknown"                    
    end select   
     
    aInfo = aInfo & "Recipients #" & (i + 1) & ": " &_
      aRecipient.DisplayText & vbTab &_
      "Type: " & aTypeAsStr & " (" & aRecipient.Typ & ")" & vbNewLine 
  next

  GetMessageInfo = aInfo
end function
Note:

In Profile Client v8 on User Interface Message Recipient Type can be found in Organisation > Work Centre > Communication > Email > New Message > To.

Version information

Added in v8.4.18