I have code from searches modified for my need.
I need to position the paste under the "Conditions" text in the xOutMsg variable. It is pasting into the first line in the email.
How do I paste on the next line after the word "Conditions"?
Sub PrepareConditionsEmail()
Dim objDoc As Word.Document
Dim objSel As Word.Selection
Dim xOutApp As Object
Dim xOutMail As Object
Dim xOutMsg As String
On Error Resume Next
Set xOutApp = CreateObject("Outlook.Application")
Set xOutMail = xOutApp.CreateItem(0)
xOutMsg = "<br /><br /><b><u>Conditions:</b></u><br /><br />" & "<b><u> </b></u><br />"
With xOutMail
'.To = "Email Address"
.CC = ""
.BCC = ""
.Subject = "Conditions"
.HTMLBody = xOutMsg
.Display
End With
Set xOutMail = Nothing
Set xOutApp = Nothing
On Error Resume Next
Set objDoc = Application.ActiveInspector.WordEditor
Set objSel = objDoc.Windows(1).Selection
objSel.PasteSpecial Link:=False, _
DataType:=wdPasteText, _
Placement:=wdInLine, _
DisplayAsIcon:=False
End Sub