Marius Nielsen
New Member
- Joined
- Feb 12, 2014
- Messages
- 10
I'm trying to adopt a code found on the internet and would really need some help as I'm totally new to VBA.
I'm in need of sending excel worksheet as attachement to email and below snip from the code is what I've looked at.
I would need to send email to the adrdress in Cell H11 with CC to address in Cell C1 of my active sheet. How can I adopt it to fit?
With Destwb
.SaveAs TempFilePath & TempFileName & FileExtStr, FileFormat:=FileFormatNum
On Error Resume Next
With OutMail
.to = ""
.CC = ""
.BCC = ""
.Subject = ""
.Body = ""
.Attachments.Add Destwb.FullName
.Send
End With
On Error GoTo 0
.Close savechanges:=False
End With
I'm in need of sending excel worksheet as attachement to email and below snip from the code is what I've looked at.
I would need to send email to the adrdress in Cell H11 with CC to address in Cell C1 of my active sheet. How can I adopt it to fit?
With Destwb
.SaveAs TempFilePath & TempFileName & FileExtStr, FileFormat:=FileFormatNum
On Error Resume Next
With OutMail
.to = ""
.CC = ""
.BCC = ""
.Subject = ""
.Body = ""
.Attachments.Add Destwb.FullName
.Send
End With
On Error GoTo 0
.Close savechanges:=False
End With