ryan_law2000
Well-known Member
- Joined
- Oct 2, 2007
- Messages
- 738
everyone I have the following code that works by send the excel workbook as an attachment in an email.
The issue is the excel workbook has many embedded files within it and they are not getting sent with the email.
But if I go file share and send as attachment they are there. Any ideas how to modify this VBA to include embedded files?
The issue is the excel workbook has many embedded files within it and they are not getting sent with the email.
But if I go file share and send as attachment they are there. Any ideas how to modify this VBA to include embedded files?
Code:
Sub EmailFinalTicket()
Dim OutlookApp As Object
Dim OutlookMail As Object
Serviceline = Worksheets("Main").Range("C20")
If (Worksheets("Main").Range("C20") = "test" Or Worksheets("Main").Range("C20") = "test") Then
'If (Serviceline = "test" Or Serviceline = "test") Then
Set OutlookApp = CreateObject("Outlook.Application")
Set OutlookMail = OutlookApp.CreateItem(0)
On Error Resume Next
With OutlookMail
.To = ""
.CC = "ryan"
.BCC = ""
.Subject = "GEAR / Job # " & Range("C6").value & " / " & Range("C7").value
.Body = ""
.Attachments.Add Application.ActiveWorkbook.FullName
.Display
End With
Set OutlookMail = Nothing
Set OutlookApp = Nothing
End If