/ Forums / Advansys Formativ / Creating Solutions with Formativ / Problems with saving messages as fmtAnsitext

  • Creator
    Topic
  • #3984
    Anonymous

    I am trying to write an applet that saves selected messages as plain text files with flexible names (by using a dialog-window in HTML).
    It works very well – but now we discovered that long mails (> 11 kB) were cut: only the last 1 or 2 kB of text were saved, the beginning is lost.

    I’m using the following command:

    GroupWise.ItemSaveMessage mailInfo(i,mailID), tNamen, fmtAnsitext

    When I change the file format to “fmtWordPerfect60” the mail will be saved completely.

    Can you explain this strange behaviour?
    Is there a restriction in the length of exported text?
    Or maybe a bug in GroupWise or Formativ?

  • Author
    Replies
  • #6783
    Support 1
    Participant

    We think there is a bug in the GroupWise Token ItemSaveMessage, when using file format fmtAnsiText. This is on the basis that it works correctly for the other format.

    You may wish to experiment with saving to either format directly from the GroupWise client, looking to see whether message data is lost this way too.

    I will notify Novell about the bug in ItemSaveMessage – if they don’t already know.

    As for alternatives to finding a solution:

    • Manually post-process the WordPerfect format to plain-text. This is probably inefficient.
    • Switch to the GroupWise Object API, using, for example, the Message object to access individual properties, including the message body. Obviously this requires much more work than using ItemSaveMessage, and you will need to design a suitable file format for the message properties.
    • Combine the Token and Object APIs. Use ItemSaveInfo from the former to create a file, and use the latter to append the message body.
    • Advansys supplies a solution that I think is similar to yours – Formativ Message Saver Pack. Details of this product are here.

    Advansys Support

    #6782
    Support 1
    Participant

    I have done some experimenting with .ItemSaveMessage, and it appears to work correctly in my test applet, which assumes a message is selected in the GroupWise message list:

    option explicit
    
    Sub Main(Client, GWEvent)
    
      dim oDlg
      dim oMsg
    
      set oMsg = Client.ClientState.CommandMessage
      if IsObject(oMsg) then
        set oDlg = Utilities.NewSaveFileDialog
        with oDlg
          .Title = "Save '" & oMsg.Subject & "' As"
          .Options = ofOverwritePrompt or ofHideReadOnly or ofShareAware
          .FileName = oMsg.Subject & ".gwm"
        end with
    
        if oDlg.Execute then
          call GroupWise.ItemSaveMessage(oMsg.MessageID, oDlg.FileName, fmtAnsitext)
        end if
      end if
    
      set oMsg = nothing
      set oDlg = nothing
    
    End Sub

    I have set the Integrations for this applet to add a button to the main GroupWise toolbar.

    If you can replicate the incorrect behaviour with this test applet, then I think the problem is to do with your environment. In that case, please send your system configuration to us at Support@advansyscorp.com. You can obtain the information via the main GroupWise Help menu: select About Formativ. When the About box appears, select the Configuration tab, then press the ‘Copy to Clipboard’ button. Finally, paste the contents of the clipboard into your message.

    Advansys Support

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