Pradeep
thanks i am captureing information related with the subject "violation notification" to excel
but the subject has '"violation notification - "
i have the code
it does not pick up the "Violation Notication"vb Code:
Public Sub ReadOutlook() Dim strString As String Dim MyArray() As String Dim olNamespace As Outlook.Namespace Dim olItem As MailItem Dim i As Integer Dim b As Integer Dim olfolder As Outlook.MAPIFolder Dim lngCol As Long Dim mypasswrd Dim olMail As Variant Set OL = GetObject(, "OUTLOOK.APPLICATION") Set MAPI = OL.GetNamespace("MAPI") Set Folder = MAPI.Folders("Inbox") For Each Myitem In Folder.Items strString = "Violation Notication - " MyArray = Split(strString, "-") If Myitem = trim(MyArray(0) Then MsgBox (Myitem)




Reply With Quote