Recurring emails and attachments

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.
 
B

Brian Tillman [MVP - Outlook]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top