Script to change the subject and color RRS feed

  • Question

  • Hello,

    I am trying to change the subject line on some of my email by using a rule that in turn executes a script.

    This is the code I am trying to use.

    Sub ChangeSubject(Item As Outlook.MailItem)
        Dim aSub
        'Dim aSub() as String
        'ReDim aSub(-1)
        aSub = Split(Item.Subject, "*")
        Select Case aSub(1)
            Case "Open"
                Item.Subject = "<p><font color=""orange"">" & aSub(0) & "</b></font></p><p></p>"
            Case "Closed"
                Item.Subject = "<p><font color=""green"">" & aSub(0) & "</b></font></p><p></p>"
            Case Else
                Item.Subject = aSub(0)
        End Select
    End Sub

    Any help would be appreciated


    Saturday, January 25, 2014 1:31 AM


All replies