#7961
Support 3
Participant

    The following code access the selected message subject and prompt if the special “[MARKER]” text exists in the subject.

      
    '-------------------------------------------------------------------------------
    ' Mainline processing
    '-------------------------------------------------------------------------------
    
    Sub Main(Client, GWEvent)
    
      dim oMsg
      dim iSubject
    
      set oMsg = Client.clientstate.commandmessage
    
      if (not oMsg is nothing) then
        iSubject = oMsg.subject
        msgbox "Message subject: " & iSubject
    
        ' See the "Visual Basic Script Guide" for the instr function which you can access
        ' from the Formativ IDE Help menu.
        if (instr(1, iSubject, "[MARKER]", vbTextCompare) > 0) then
          msgbox "Marker found."
        end if
    
      end if
    
      set oMsg = nothing
    
    
    End Sub
    

    You can set the Mail – “On Reply” event as explained earlier to execute the code on replying message.

    Regards,
    Advansys Support