I am trying to read content of an email in Outlook from the VB program.
I have inserted this Microsoft office outlook view control, and in the code below I can identify emails by subject line and open it, but I want to be able toread the body of the opened email into a variable and parse it ...
Private Sub Command4_Click( )
'D1 = InputBox("Pleas e enter a valid staff ID: ")
D1 = "Report Server Problem"
D1 = "'%" & D1 & "%'"
strString = """urn:schemas: httpmail:subjec t"" LIKE " & D1
ViewCtl1.Filter = strString
ViewCtl1.Open
Set Number = ViewCtl1.Select ion(1)
' MsgBox Number
ItemCount = ViewCtl1.ItemCo unt
MsgBox ItemCount
End Sub
I have inserted this Microsoft office outlook view control, and in the code below I can identify emails by subject line and open it, but I want to be able toread the body of the opened email into a variable and parse it ...
Private Sub Command4_Click( )
'D1 = InputBox("Pleas e enter a valid staff ID: ")
D1 = "Report Server Problem"
D1 = "'%" & D1 & "%'"
strString = """urn:schemas: httpmail:subjec t"" LIKE " & D1
ViewCtl1.Filter = strString
ViewCtl1.Open
Set Number = ViewCtl1.Select ion(1)
' MsgBox Number
ItemCount = ViewCtl1.ItemCo unt
MsgBox ItemCount
End Sub