ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   send file by e-mail (https://www.excelbanter.com/excel-programming/281976-send-file-e-mail.html)

Gareth[_3_]

send file by e-mail
 
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




Tom Ogilvy

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







All times are GMT +1. The time now is 08:31 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com