ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Mail worksheet in Body AND Attach File (https://www.excelbanter.com/excel-programming/422778-mail-worksheet-body-attach-file.html)

BenS

Mail worksheet in Body AND Attach File
 
Hi,

I'm successfully using Ron DeBruin's great code found here
(http://www.rondebruin.nl/mail/folder3/mail2.htm) to send emails with an
Excel worksheet in the body of the mail.

What I'd like to do, but have not been successful, is also attaching the
Excel file to the email. I thought this might be straightforward, by taking
code from Ron's other examples, but it hasn't worked.

I've tried adding the line:
Attachments.Add <PATH

I don't get an error, but I also don't get the attachment. Can anyone offer
any suggestions here as to how I might get this to work?

Thanks!

Ron de Bruin

Mail worksheet in Body AND Attach File
 
Hi Ben

Try this

..Attachments.Add ("C:\test.txt")


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"BenS" wrote in message ...
Hi,

I'm successfully using Ron DeBruin's great code found here
(http://www.rondebruin.nl/mail/folder3/mail2.htm) to send emails with an
Excel worksheet in the body of the mail.

What I'd like to do, but have not been successful, is also attaching the
Excel file to the email. I thought this might be straightforward, by taking
code from Ron's other examples, but it hasn't worked.

I've tried adding the line:
Attachments.Add <PATH

I don't get an error, but I also don't get the attachment. Can anyone offer
any suggestions here as to how I might get this to work?

Thanks!


BenS

Mail worksheet in Body AND Attach File
 
Hi Ron,

That did it! Thank you so much, not only for the lightning fast reply, but
for all of the information on your web page. I can't tell you how many times
I've been able to solve a problem at work thanks to your site.

Kind regards,
Ben

"Ron de Bruin" wrote:

Hi Ben

Try this

..Attachments.Add ("C:\test.txt")


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"BenS" wrote in message ...
Hi,

I'm successfully using Ron DeBruin's great code found here
(http://www.rondebruin.nl/mail/folder3/mail2.htm) to send emails with an
Excel worksheet in the body of the mail.

What I'd like to do, but have not been successful, is also attaching the
Excel file to the email. I thought this might be straightforward, by taking
code from Ron's other examples, but it hasn't worked.

I've tried adding the line:
Attachments.Add <PATH

I don't get an error, but I also don't get the attachment. Can anyone offer
any suggestions here as to how I might get this to work?

Thanks!



Ron de Bruin

Mail worksheet in Body AND Attach File
 
You are welcome

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"BenS" wrote in message ...
Hi Ron,

That did it! Thank you so much, not only for the lightning fast reply, but
for all of the information on your web page. I can't tell you how many times
I've been able to solve a problem at work thanks to your site.

Kind regards,
Ben

"Ron de Bruin" wrote:

Hi Ben

Try this

..Attachments.Add ("C:\test.txt")


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"BenS" wrote in message ...
Hi,

I'm successfully using Ron DeBruin's great code found here
(http://www.rondebruin.nl/mail/folder3/mail2.htm) to send emails with an
Excel worksheet in the body of the mail.

What I'd like to do, but have not been successful, is also attaching the
Excel file to the email. I thought this might be straightforward, by taking
code from Ron's other examples, but it hasn't worked.

I've tried adding the line:
Attachments.Add <PATH

I don't get an error, but I also don't get the attachment. Can anyone offer
any suggestions here as to how I might get this to work?

Thanks!




All times are GMT +1. The time now is 07:00 PM.

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