I have not attempted to debug your code, however the following macro will replace line breaks with paragraph breaks in the current message. You can display the line breaks with CTRL+SHIFT+*
Option Explicit
Private Sub ReplaceLineBreaks(ByVal objItem As MailItem)
Dim objInsp As Outlook.Inspector
Dim objWord As Object
Dim objDoc As Object
Dim objRng As Object
' Reference to Word library
' in VBA Editor, Tools, References (not required)
'Reference the current Outlook item
With objItem
If .Class = olMail Then
Set objInsp = objItem.GetInspector
Set objDoc = objInsp.WordEditor
Set objRng = objDoc.Range
.Display
With objRng.Find
Do While .Execute(FindText:="^l")
objRng = vbCr
objRng.collapse 0
Loop
End With
End If
End With
End Sub
Open a message and test the macro with the following:
Sub test()
ReplaceLineBreaks ActiveInspector.CurrentItem
End Sub
It is not clear what your problem is, but this should remove replace all line breaks in the message.