Hi guys!
Here's my problem: The msg variable is not posting to the email window. So the body is blank whenever i send it. I pasted my code below. Any help is appreciated.
Joe
'Dimension all variables
Dim rngAddy As Range, cel As Range
Dim strAddy As String
Dim OLApp As Object, OLMsg As Object
Dim Msg As String
Dim ContactName As Range
Dim InvoiceDate As Range
'Set all variables
Set ContactName = ActiveWorkbook.Sheets("Customer Info").Range(b16)
Set InvoiceDate = ActiveWorkbook.Sheets("Invoice").Range(k3)
Set OLApp = CreateObject("Outlook.Application")
Set OLMsg = OLApp.CreateItem(0)
Set rngAddy = ActiveWorkbook.Sheets("Customer Info").Range("B11")
***************** Msg = "Dear " & ContactName.Value & ", Thank you for choosing CCE Services for your cable and telecommunication needs. Attached you will find the latest aging statement listing all past invoices, respective dates due, and other information. If you have incurred any billings throughout week ending" & InvoiceDate.Value & ", you will find those invoices attached as well. If you have any questions or concerns, please feel free to contact our accounting department."
'Set Outlook message details
With OLMsg
.To = strAddy
.Subject = "Aging Report and New Invoices"
.Attachments.Add ActiveWorkbook.FullName
**************** .Body = Msg
.Display
End With
Here's my problem: The msg variable is not posting to the email window. So the body is blank whenever i send it. I pasted my code below. Any help is appreciated.
Joe
'Dimension all variables
Dim rngAddy As Range, cel As Range
Dim strAddy As String
Dim OLApp As Object, OLMsg As Object
Dim Msg As String
Dim ContactName As Range
Dim InvoiceDate As Range
'Set all variables
Set ContactName = ActiveWorkbook.Sheets("Customer Info").Range(b16)
Set InvoiceDate = ActiveWorkbook.Sheets("Invoice").Range(k3)
Set OLApp = CreateObject("Outlook.Application")
Set OLMsg = OLApp.CreateItem(0)
Set rngAddy = ActiveWorkbook.Sheets("Customer Info").Range("B11")
***************** Msg = "Dear " & ContactName.Value & ", Thank you for choosing CCE Services for your cable and telecommunication needs. Attached you will find the latest aging statement listing all past invoices, respective dates due, and other information. If you have incurred any billings throughout week ending" & InvoiceDate.Value & ", you will find those invoices attached as well. If you have any questions or concerns, please feel free to contact our accounting department."
'Set Outlook message details
With OLMsg
.To = strAddy
.Subject = "Aging Report and New Invoices"
.Attachments.Add ActiveWorkbook.FullName
**************** .Body = Msg
.Display
End With