Sending email using VBA

richanor

Active Member
Joined
Apr 8, 2006
Messages
285
Hi, I am using a bit of code I found on here to send a selected worksheet by email. Below is a snippet of the code:

Code:
    With Dest
        .SaveAs TempFilePath & TempFileName & FileExtStr, _
                FileFormat:=FileFormatNum
        On Error Resume Next
        .SendMail "myemail@domain.com", _
                  "Subject"
        On Error GoTo 0
        .Close SaveChanges:=False
    End With

    Kill TempFilePath & TempFileName & FileExtStr

I wondered if there is any way to tweak the code to add in a second email address, or a cc - as I wanted to sent the sheet to two people at once, but I don't want the user to have to click 'allow' several times. I've tried a few tweaks but none of them have worked - is this possible?

many thanks

Rich
 

Some videos you may like

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.

richanor

Active Member
Joined
Apr 8, 2006
Messages
285
Hi Andrew

thanks for your reply, and sorry about the delay in responding - I've been away. Your help, as always, is very much appreciated.

Rich
 

Watch MrExcel Video

Forum statistics

Threads
1,108,816
Messages
5,525,061
Members
409,617
Latest member
Lenaf

This Week's Hot Topics

Top