L
LKP
I am trying to get a send email button to send emails to multiple addresses.
I can get it to work for one address, but I don't know how to do multiples.
Here's the code:
wb1.SaveCopyAs TempFilePath & TempFileName & FileExtStr
Set wb2 = Workbooks.Open(TempFilePath & TempFileName & FileExtStr)
With wb2
On Error Resume Next
.SendMail "(e-mail address removed)", _
"Product"
On Error GoTo 0
.Close SaveChanges:=False
End With
'Delete the file
Kill TempFilePath & TempFileName & FileExtStr
With Application
.ScreenUpdating = True
.EnableEvents = True
Can anyone help?
Also, when I click on this button, a security warning pops up asking if I
want to enable the macros, which I do. How do I turn that pop up off?
I can get it to work for one address, but I don't know how to do multiples.
Here's the code:
wb1.SaveCopyAs TempFilePath & TempFileName & FileExtStr
Set wb2 = Workbooks.Open(TempFilePath & TempFileName & FileExtStr)
With wb2
On Error Resume Next
.SendMail "(e-mail address removed)", _
"Product"
On Error GoTo 0
.Close SaveChanges:=False
End With
'Delete the file
Kill TempFilePath & TempFileName & FileExtStr
With Application
.ScreenUpdating = True
.EnableEvents = True
Can anyone help?
Also, when I click on this button, a security warning pops up asking if I
want to enable the macros, which I do. How do I turn that pop up off?