VBA Code to select value from Outlook Adin RRS feed

  • Question

  • Hi Friends,

    I have the below VBA to send mail from outlook but I am unable to figure out the piece of code that would select the 'classification: Restricted' (This add in was developed by client and the add in called as IC labeeling addin and added to outlook Ribbon).

    Can some one please help me with the code, to select the value from outlook Ribbon?


    Sub CreateMail()
        Dim rng As Range
        rowN = ThisWorkbook.Sheets("Impact Analysis").Cells(Rows.Count, 7).End(xlUp).Row
        Set rng = ThisWorkbook.Sheets("Impact Analysis").Range("C6:G" & rowN)
        Dim OutApp
        Set OutApp = CreateObject("Outlook.Application")
        Set OutMail = OutApp.CreateItem(0)
        With OutMail
            .To = ""
            '.CC = ""
            '.BCC = ""
            .Subject = "Table change impact please review."

            .HTMLBody = "The below changes has been made to the tables,please perform the regression testing" & vbCrLf & RangetoHTML(rng) _
            & vbCrLf & "Reason for Change:"

        End With

    Thanks in Advance.

    Sunday, May 14, 2017 7:35 PM

All replies