Body Text difficulty when Excel launches Outlook Message

A

ajaypondicherry

I need to generate an email from excel which contains excel data in an
outlook mail message. I cannot find a way to insert more text after the
original body text (much like the insert.after.text command when
launching a MS Word document). I would like to have a loop which
inserts more text into the message body, but the .body command will
replace all existing text.

Set objOL = New Outlook.Application
Set objMail = objOL.CreateItem(olMailItem)
'This will make the user enter the CID if it is not already entered
If Sheet1.Cells(2, 1) = 0 Or Sheet1.Cells(2, 1) = "" Then
Sheet1.Cells(2, 1) = InputBox("Please enter the CID")
End If
'This creates the email and fills out all fields
With objMail
.To = "(e-mail address removed)"
.Subject = "CHOMPS Request for " & Sheet1.Cells(2, 2) & " (" &
Sheet1.Cells(2, 1) & ")"
.Body = "CHOMPS Request Form" & Chr(11) & Chr(11) & "*Category: " &
Sheet1.Cells(2, 2) & " (" & Sheet1.Cells(2, 1) & ")" & Chr(11) &
Chr(11) & "*Items to Move: " & Chr(11) & Chr(11) & "*Does Taxonomy need
to be changed?" & Chr(11) & Chr(11) & "New Category Locations for all
items:" & Chr(11) & Chr(11) & "Additional Keywords (if any):" & Chr(11)
& Chr(11) & "Additional Notes (if any): " & Chr(11) & Chr(11) &
"*Required Information"


.Display
End With
 
P

Perry

Have you tried to catch the entire body text in a variable *before* passing
it to the mailitem .Body property ??
Like (simplified)

sBody = "some huge huge huge text " & Chr(13) & Chr(11) & "...etc."

With objMail
.Body = sBody
.Display
End With

Krgrds,
Perry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top