/ Forums / Advansys Formativ / Creating Solutions with Formativ / Problem processing RTF code

  • Creator
    Topic
  • #3960
    kparmelee
    Participant

    Hello,

    I’m not sure if this problem is a result of me upgrading my workstation to GroupWise 6.5 SP1 or to Formativ Developer Build 1.6.0.7, but…

    I have RTF code in my applet that creates the body text of my email. Before the upgrade, GroupWise would interpret the RTF code and give me a beautifully formatted message. Now, however, it just outputs the RTF code itself.

    I’ve made sure my default composing view is Plain Text (though I added GroupWise.SwitchToRTFView to be sure).

    Any ideas?

    Thanks,
    Kate

  • Author
    Replies
  • #6717
    Support 1a
    Participant

    Kate,

    1.6.0.7 didn’t change anything related to RTF output, so I suspect the 6.5 SP1 build. Could you please send a copy of your applet to support@advansyscorp.com and I’ll test it in-house.

    Advansys Support

    #6716
    kparmelee
    Participant

    I just send the applet! Thank you.

    #6718
    Support 1a
    Participant

    Thanks – I have asked one of our engineers to take a look.

    Advansys Support

    #6715
    Support 1a
    Participant

    Dear Kate,

    Thank you for the sample applets. We could see two issues that would cause problems:

    1) A raw RTF string was being assigned to the Msg.BodyText property. However, the .BodyText property interprets any string assigned to it literally. You need to use the Msg.BodyText.RTF property. (.RTF accepts an RTF string).

    2) When an item is being composed, it does not yet exist in the message store. This means you cannot use the Object API to access it. Instead, you use the ‘token’ approach, where unfortunately the Msg.BodyText.RTF property is not available. The GroupWise.ComposingItem property actually gives you a ‘wrapped’ message object that differs from the one where you are able to use the Msg.BodyText.RTF approach. When dealing with composing messages, you need to use formatting commands to apply the appropriate text styles. For example:

        Call GroupWise.NewMail
        Call GroupWise.SwitchToRTFView
        
        ' -----   Set the subject --------    
        Call GroupWise.FocusSet(fcsSubject, "")
        Call GroupWise.TypeText("This is the new subject")
        
        
        ' ----- Set the message body --------
        Call GroupWise.FocusSet(fcsMessage, "")
        Call GroupWise.TypeText("This is plain")    
        
        ' Bold
        Call GroupWise.FontBold(True)    
        Call GroupWise.TypeText("bold")
        Call GroupWise.FontBold(FALSE)
        
        ' Italic
        Call GroupWise.FontItalic(True)    
        Call GroupWise.TypeText("italics")
        Call GroupWise.FontItalic(FALSE)    
    

    We have updated your example applets accordingly and sent them to you via email.

    Advansys Support

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.