yeap, copy the whole code and paste it in Thisworkbook (have a look in the left side and click on Thisworkbook and then in the right side select Workbook
something like this...
Private Sub Workbook_Open()
Dim ce As Range, i As Long
Dim OutApp As Object
Dim OutMail As Object
Dim strto As String, strcc As String, strbcc As String
Dim strsub As String, strbody As String
Dim MyName As String
MyName = ThisWorkbook.Name
For i = 2 To Sheets("Sheet1").Range("a65536").End(xlUp).Row
If Cells(i, 1).Value <= Date And Cells(i, 2) = "" Then
Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)
With Sheets("Sheet1")
strto = .Cells(i, 3).Value 'column O
strcc = "" '.Cells(i, 4).Value
strbcc = ""
strsub = MyName
strbody = "Hi there," & "pls see" & " " & MyName 'vbNewLine & vbNewLine & _
.Cells(i, 2).Value & " " & _
"needs an updated" & " " & .Cells(i, 4).Value & " " & _
"because it expires on" & " " & .Cells(i, 11).Value & "." & _
vbCrLf & vbCrLf & "Thank you."
End With
With OutMail
.To = strto
.CC = strcc
.BCC = strbcc
.Subject = strsub
.Body = strbody
'.Send
.display
Cells(i, 1).Select
With Selection.Font
.Color = -16776961
.TintAndShade = 0
End With
End With
Set OutMail = Nothing
Set OutApp = Nothing
End If
Next i
End Sub
Bookmarks