AchyBreakyHeart
Jul 1 2005, 01:33 AM
Hi all,
Is it possible to send out 2 workbooks attached to an email with multiple reciepients? I've tried to send the workbooks individually using the sendmail function but somehow the second workbook always get stuck in the outbox and it isn't sent out at all
Can anyone help me on this? :(
sas_xpert
Jul 1 2005, 11:14 PM
What mail software are you using, and what are you doing to send the mail message...
KingMartin
Jul 2 2005, 04:00 PM
Hello,
see if the following snippet helps:
CODE
Sub MailMe()
Dim OutApp As Object
Dim OutMail As Object
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
With OutMail
.To = "test@whatever.com"
.CC = ""
.BCC = ""
.Subject = "Subject here"
.Body = "Hello"
.Attachments.Add "C:\Book1.xls"
.Attachments.Add "C:\Book2.xls"
.Send
End With
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
(late binding, no reference to Outlook needed)

Martin
AchyBreakyHeart
Jul 5 2005, 09:10 AM
Actually the mail program that is being used is outlook express
Will the snippet work with outlook express?
Jamie
AchyBreakyHeart
Jul 7 2005, 01:25 AM
The object to be created is Outlook.application
what do you do if you wanna use the outlook express application?
cos the mail server and everything is set up using the outlook express application
Jamie
KingMartin
Jul 7 2005, 05:21 PM
Hi again Jamie,
I am using Outlook 2k and I am not sure if Outlook Express supports VBA, not sure at all.
May be that sending your workbooks one by one via sendmail is the only option... Unfortunately I can't test it for you.
Regards,
Martin
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.