• Creator
    Topic
  • #4114
    jeka
    Participant

    How can I find the data content from the field “personalized subject” and “catagory”

    Thanks for help

  • Author
    Replies
  • #7141
    Support 1
    Participant

    Thank you for your enquiry.

    Below is an example of how one might use the GroupWise Object API from Formativ to obtain the Subject, Personal Subject and Categories from the open Message View.

    Please note that Personal Subject and Categories are message properties which became available in GroupWise 6.5 and later.

    Sub Main(Client, GWEvent)
    
      dim iPerSubject, iSubject, iText
      dim oCategories, oCategory
      dim oMsg
    
      set oMsg = nothing
      set oMsg = Client.ClientState.CommandMessage
      if not (oMsg is nothing) then
        iSubject = "Subject: " & oMsg.Subject.PlainText
        iPerSubject = "Personal Subject: " & oMsg.PersonalSubject
    
        iText = ""
        set oCategories = oMsg.Categories
        if not (oCategories is nothing) then
          if oCategories.Count > 0 then
            for each oCategory in oCategories
              iText = iText & "Category: " & oCategory.Name & vbNewLine
            next
          else
            iText = vbNewLine & iText & "No categories"
          end if
        end if
        iText = iSubject & vbNewLine & iPerSubject & vbNewLine & iText
      else
        iText = "Message not found"
      end if
    
      MsgBox iText
    
    End Sub

    For more information about the Object API see this online reference.

    I hope this helps you.

    Advansys Support

    [This message was edited by Support 3 on March 01, 2005 at 05:20 PM.]

    #7140
    jeka
    Participant

    Thank you for this information. Can I write the data content for the PersonalSubject when I send a new Mail?

    Thanks for help

    #7142
    Support 1
    Participant

    The Mail property PersonalSubject is only available using the GroupWise Object API, which unfortunately does not provide a means to access a message during the Send event.

    You might wish to consider the following approach.

    • Before sending, a user manually marks a message as requiring a personal subject. For example, the user could enter the special text “[[PS]]” in the message subject.
    • Create an applet which executes on the event On Message Arrival (for the GroupWise Application, not Mail, etc), and
    • Uses GroupWise.Account.MailBox.FindMessages() to filter for a message which is unread; whose message type is, for example, Mail; box type is incoming and subject contains “[[P]]”, and
    • Sets the personal subject using the syntax oMsg.PersonalSubject = “My Personal Subject”, and
    • Sets oMsg.Read = false, because accessing/changing the message can implicitly set Read = true (which will confuse the user).

    I hope this helps you.

    Advansys Support

    #7146
    jeka
    Participant

    Thanks for your answer. My problem however is that I would like to enter the personal subject within the sent item directly after sending it. Do you have any ideas? Thank you in advance for your help.

    Kind regards

    #7144
    Support 1a
    Participant

    Unfortunately, the OnSend event occurs at a point in time before the final message ID of the outgoing message is available. This means you cannot easily identify the outgoing message’s message ID, which you would need in order to customize the Personal Subject. This problem has been present for many years, and is one we have asked Novell to address many times.

    The only workaround is to collect key information about the message being sent (i.e. subject, date, etc), wait a short period, then locate the message in the sent items folder that matches the criteria. Once located, use the object API to update the PersonalSubject.

    I hope this helps.

    Advansys Support

    #7143
    jeka
    Participant

    Hi,

    thanks for your informations. How can I create a category and set to aktiv?
    Thank you for help

    Kind regards

    #7145
    Support 1
    Participant

    I would suggest you take a look at this post in this Support Forum.

    Advansys Support

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