ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   email Word DOC along with XL sheet? (https://www.excelbanter.com/excel-programming/418764-email-word-doc-along-xl-sheet.html)

CLR

email Word DOC along with XL sheet?
 
Hi all.........
I can send the XL sheet(s) ok fine.........just don't know how to also
attach a Word Document...........

Any ideas please?

Vaya con Dios,
Chuck, CABGx3

Ron de Bruin

email Word DOC along with XL sheet?
 
Hi CLR

If you use Outlook you can use code like this
http://www.rondebruin.nl/mail/folder2/mail1.htm

You can repeat this line for every file you want to attach
.Attachments.Add ("C:\test.txt")

You can also look at this example
http://www.rondebruin.nl/mail/folder2/files.htm



--

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


"CLR" wrote in message ...
Hi all.........
I can send the XL sheet(s) ok fine.........just don't know how to also
attach a Word Document...........

Any ideas please?

Vaya con Dios,
Chuck, CABGx3


CLR

email Word DOC along with XL sheet?
 
Thanks Ron.....unfortunately I'm using Lotus Notes. My code came mainly from
you.....it works great, just need to add the word document attachment.


TempFilePath = ThisWorkbook.Path
TempFileName = "EmailTest"
With ActiveWorkbook
.SaveAs TempFilePath & TempFileName & FileExtStr
Dim emadd
emadd = EmailAddy 'Range("emailtemp!p18 ").Value
Dim INSTRUCTIONS
INSTRUCTIONS = "INSTRUCTIONS.DOC"
.SendMail emadd, "Supplier Report Card"
.Close SaveChanges:=False
End With

Range("data!q1:y25").Copy 'This is the cover sheet text for the email
'This SendKey string pastes the cover sheet Text into the email and steps
'out of the email client Lotus Notes.
SendKeys "^v" & "~"
Kill TempFilePath & TempFileName & FileExtStr

Any ideas?

Vaya con Dios
Chuck, CABGx3

"Ron de Bruin" wrote:

Hi CLR

If you use Outlook you can use code like this
http://www.rondebruin.nl/mail/folder2/mail1.htm

You can repeat this line for every file you want to attach
.Attachments.Add ("C:\test.txt")

You can also look at this example
http://www.rondebruin.nl/mail/folder2/files.htm



--

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


"CLR" wrote in message ...
Hi all.........
I can send the XL sheet(s) ok fine.........just don't know how to also
attach a Word Document...........

Any ideas please?

Vaya con Dios,
Chuck, CABGx3



Ron de Bruin

email Word DOC along with XL sheet?
 
With SendMail it is not possible

Use CDO
http://www.rondebruin.nl/cdo.htm


--

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


"CLR" wrote in message ...
Thanks Ron.....unfortunately I'm using Lotus Notes. My code came mainly from
you.....it works great, just need to add the word document attachment.


TempFilePath = ThisWorkbook.Path
TempFileName = "EmailTest"
With ActiveWorkbook
.SaveAs TempFilePath & TempFileName & FileExtStr
Dim emadd
emadd = EmailAddy 'Range("emailtemp!p18 ").Value
Dim INSTRUCTIONS
INSTRUCTIONS = "INSTRUCTIONS.DOC"
.SendMail emadd, "Supplier Report Card"
.Close SaveChanges:=False
End With

Range("data!q1:y25").Copy 'This is the cover sheet text for the email
'This SendKey string pastes the cover sheet Text into the email and steps
'out of the email client Lotus Notes.
SendKeys "^v" & "~"
Kill TempFilePath & TempFileName & FileExtStr

Any ideas?

Vaya con Dios
Chuck, CABGx3

"Ron de Bruin" wrote:

Hi CLR

If you use Outlook you can use code like this
http://www.rondebruin.nl/mail/folder2/mail1.htm

You can repeat this line for every file you want to attach
.Attachments.Add ("C:\test.txt")

You can also look at this example
http://www.rondebruin.nl/mail/folder2/files.htm



--

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


"CLR" wrote in message ...
Hi all.........
I can send the XL sheet(s) ok fine.........just don't know how to also
attach a Word Document...........

Any ideas please?

Vaya con Dios,
Chuck, CABGx3



CLR

email Word DOC along with XL sheet?
 
Thanks Ron..........
It looks great, I'll give it a try...........

Vaya con Dios,
Chuck, CABGx3



"Ron de Bruin" wrote:

With SendMail it is not possible

Use CDO
http://www.rondebruin.nl/cdo.htm


--

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


"CLR" wrote in message ...
Thanks Ron.....unfortunately I'm using Lotus Notes. My code came mainly from
you.....it works great, just need to add the word document attachment.


TempFilePath = ThisWorkbook.Path
TempFileName = "EmailTest"
With ActiveWorkbook
.SaveAs TempFilePath & TempFileName & FileExtStr
Dim emadd
emadd = EmailAddy 'Range("emailtemp!p18 ").Value
Dim INSTRUCTIONS
INSTRUCTIONS = "INSTRUCTIONS.DOC"
.SendMail emadd, "Supplier Report Card"
.Close SaveChanges:=False
End With

Range("data!q1:y25").Copy 'This is the cover sheet text for the email
'This SendKey string pastes the cover sheet Text into the email and steps
'out of the email client Lotus Notes.
SendKeys "^v" & "~"
Kill TempFilePath & TempFileName & FileExtStr

Any ideas?

Vaya con Dios
Chuck, CABGx3

"Ron de Bruin" wrote:

Hi CLR

If you use Outlook you can use code like this
http://www.rondebruin.nl/mail/folder2/mail1.htm

You can repeat this line for every file you want to attach
.Attachments.Add ("C:\test.txt")

You can also look at this example
http://www.rondebruin.nl/mail/folder2/files.htm



--

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


"CLR" wrote in message ...
Hi all.........
I can send the XL sheet(s) ok fine.........just don't know how to also
attach a Word Document...........

Any ideas please?

Vaya con Dios,
Chuck, CABGx3




All times are GMT +1. The time now is 11:57 AM.

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