UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Sending an email with 2 workbooks as attachments    
 
   
AchyBreakyHeart
post Jul 1 2005, 01:33 AM
Post #1

UtterAccess Addict
Posts: 229
From: SG



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? :(
Go to the top of the page
 
+
sas_xpert
post Jul 1 2005, 11:14 PM
Post #2

UtterAccess Addict
Posts: 184
From: Berks County, PA



What mail software are you using, and what are you doing to send the mail message...
Go to the top of the page
 
+
KingMartin
post Jul 2 2005, 04:00 PM
Post #3

Retired Moderator
Posts: 10,959
From: Prague,CZ / Kiev,UA



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)

(IMG:style_emoticons/default/smile.gif)
Martin
Go to the top of the page
 
+
AchyBreakyHeart
post Jul 5 2005, 09:10 AM
Post #4

UtterAccess Addict
Posts: 229
From: SG



Actually the mail program that is being used is outlook express
Will the snippet work with outlook express?

Jamie
Go to the top of the page
 
+
AchyBreakyHeart
post Jul 7 2005, 01:25 AM
Post #5

UtterAccess Addict
Posts: 229
From: SG



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
Go to the top of the page
 
+
KingMartin
post Jul 7 2005, 05:21 PM
Post #6

Retired Moderator
Posts: 10,959
From: Prague,CZ / Kiev,UA



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
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 25th May 2013 - 05:28 PM