Sub CDO_Mail_Small_Text()
Dim iMsg As Object
Dim iConf As Object
Dim Flds As Variant
Dim TARGETNAME As String
TARGETNAME = Format(Now - 1, "yyyy-mm-dd") & ".xls"
Dim FILEPATH As String
FILEPATH = "G:\Customer Contact Services\Reporting\Outgoing MI\Daily Reports\"
Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
iConf.Load -1 'CDO Source Defaults
Set Flds = iConf.Fields
With Flds
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "tgrex0001"
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
.Update
End With
With iMsg
Set .Configuration = iConf
.To = "
[email protected]"
.CC = "
[email protected]"
.BCC = ""
.From = """White, Lee""<
[email protected]>"
.Subject = "TEST VBA"
.HTMLBody = "<Font Face =Arial> <Font Size = 2><p>Dear all,</p>" & _
"<p>Please find attached a copy of the lastest CCS Outgoing One Pager.</p>" & _
"<p>A copy of this report can also be found in G:\Customer Contact Services\Reporting\Outgoing MI.</p>" & _
"<p>Kind regards,<br>" & _
"CCS Automation</br>"
.Attach = FILEPATH & TARGETNAME
.Send
End With
Bookmarks