Recurring emails and attachments

  • Thread starter Thread starter JenniferCHW
  • Start date Start date
J

JenniferCHW

I found the code to write a recurring email and it works great. I want to
further automate this email and have outlook automatically attach documents.
I've found references to it but can't seem to make it work. Can anyone
help? Here's the code that creates the email.

Sub Item_PropertyChange (ByVal Name)
Select Case Name
Case "Status"
if Item.Status = 2 then '2 = Completed
Set NewItem = Application.CreateItem(0)
NewItem.To = "addressees"
NewItem.Recipients.ResolveAll
NewItem.Subject = "Payroll Reminder"
NewItem.Body = "To all employees: " & vbCrLf & " " & vbCrLf & "The pay
period is coming to a close...."
NewItem.Display
End IF
End Select
End Sub

Let me know if you can help. Thanks so much.
 
I found the code to write a recurring email and it works great. I want to
further automate this email and have outlook automatically attach
documents.
I've found references to it but can't seem to make it work. Can anyone
help? Here's the code that creates the email.

Sub Item_PropertyChange (ByVal Name)
Select Case Name
Case "Status"
if Item.Status = 2 then '2 = Completed
Set NewItem = Application.CreateItem(0)
NewItem.To = "addressees"
NewItem.Recipients.ResolveAll
NewItem.Subject = "Payroll Reminder"
NewItem.Body = "To all employees: " & vbCrLf & " " & vbCrLf & "The pay
period is coming to a close...."
NewItem.Display
End IF
End Select
End Sub

Coding questions belong in microsoft.public.outlook.program_vba
 
Back
Top