View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default send file by e-mail

try

strbody = "Line 1" & vbNewLine & vbNewLine & _
"Line 2" & vbNewLine & vbNewLine & _
"Line 3 & vbNewLine & vbNewLine

--
Regards,
Tom Ogilvy


Gareth wrote in message
...
I am new to sending files automatically and am having trouble setting the
message body text.

I want three lines of text (with a blank line between them) and then the
attachment.

I have been trying to use the following:

Dim strbody As String
strbody = "Line 1" & vbNewLine & vbNewLine & _
"Line 2" & vbNewLine & vbNewLine & _
"Line 3

And then putting .Body = strbody

The text all appears OK but the attachment (which has a long file name)
'joins' itself to the end of line 3 text. Is there any way around this?

Gareth