#6574
Support 1a
Participant

    When you mentioned a composing message, I thought you meant a message that was being composed and was not in the message store. In that situation you can use tokens as suggested.

    When you are creating a message programmatically and with no user interface, you really need to use the RTF (Rich Text Format) property of the message body text to get the desired results. It’s a little more difficult to do, but here’s a simple example. Note I have greatly simplified the RTF code in this example:

    Sub Main(Client, GWEvent)
    
      dim iBody
      
      iBody =   "{rtf1ansiansicpg1252uc1 {This is plain" &_
                "par" &_
                "par This is }{b bold}{" &_
                "par This is }{i italics}{" &_
                "par }}"
    
    
    ' Create a email message
      Set NewMsg = GroupWise.Account.MailBox.Messages.Add("GW.MESSAGE.MAIL", 4)
      
      ' Add a recipient 
      MsgRecipient = NewMsg.Recipients.Add(GroupWise.Account.Owner.EmailAddress,,0) 
      
      ' Subject and body text of the mail
      NewMsg.FromText = GroupWise.Account.Owner.DisplayName
      NewMsg.Subject = "System Störung"
      NewMsg.BodyText.RTF = iBody
      NewMsg.Send
         
    End Sub

    I hope this helps.

    Advansys Support