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:
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
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