Can anyone tell me how to get the body text of an email into a string
Tried the code below but it gives an error
Cheers
Gibbo
Dim myMailItem As MailItem
Dim StrTest As String
StrTest = myMailItem.Body
MsgBox StrTest
Sorry just spotted this
Sub GetSelectedMailText()
Dim myOlSel As Outlook.Selection
Dim strText As String
'check there's something selected
If Application.ActiveExplorer.Selection.Count = 1 Then
Set myOlSel = Application.ActiveExplorer.Selection
strText = myOlSel.Item(1).Body
'do something with the mail item body text
MsgBox strText
End If
End Sub
Consider this solved