Hello! I am new to vba (learning fairly quickly i think),am stuck and am hoping someone can help me. I keep getting an 'Object Required' error and I am not sure why/what I am missing.
I don't think it's anything major, but it's screwing me up and I am getting frustrated.
The code is:
I don't think it's anything major, but it's screwing me up and I am getting frustrated.
The code is:
VBA Code:
Sub Email_123()
Dim i As Integer
Dim w As Workbook
Dim ws As Worksheet
Dim xOTApp As Object
Dim myattachments As Object
With CreateObject("Outlook.Application").CreateItem(0)
'Do While Not sContacts.Cells(i, column).Value = ""
' xEmailAddr = sContacts.Cells(i, column).Value & ";" & xEmailAddr
' i = i + 1
' Loop
' Set i = xOTApp.CreateItem(0)
.To = " "
.CC = " "
.BCC = Range("B4").Value
.Subject = Range("D4").Value
.body = Range("B11")
.attachments.Add Range("b7").Value
.Display
End With
End Sub