Pinaceous
Well-known Member
- Joined
- Jun 11, 2014
- Messages
- 1,124
- Office Version
- 365
- Platform
- Windows
Hi All,
I'm using this code to generate an email to send:
This code is really working great!
My only question is, How do I automatically attach two files to these generated emails?
Does anyone know where I put this into the code above??
I'm lost!
Many thanks in advance!
Pinaceous
I'm using this code to generate an email to send:
Code:
Sub sendemail()
Dim FileExtStr As String
Dim FileFormatNum As Long
Dim Sourcewb As Workbook
Dim Destwb As Workbook
Dim TempFilePath As String
Dim TempFileName As String
Dim OutApp As Object
Dim OutMail As Object
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
With OutMail
.to = Worksheets("admin").Range("f9").Value
.CC = Worksheets("admin").Range("f10").Value
.BCC = ""
.Subject = Worksheets("admin").Range("i11").Value
.Body = Worksheets("admin").Range("i12").Value
.display
End With
End Sub
This code is really working great!
My only question is, How do I automatically attach two files to these generated emails?
Does anyone know where I put this into the code above??
I'm lost!
Many thanks in advance!
Pinaceous