monplankton
Registered User.
- Local time
- Today, 06:11
- Joined
- Sep 14, 2011
- Messages
- 83
Been using a mailing program for some time to send out 2 documents using a mailing list in Access 2003 but for some reason, beyond me it has thrown up an error, any help much appricated.
Code:
Private Sub Command12_Click()
Do
Dim objOutlook As Outlook.Application, objMailItem As MailItem
Set objOutlook = New Outlook.Application
Set objMailItem = objOutlook.CreateItem(olMailItem)
With objMailItem
.To = Me![E'Mail]
.Subject = "Inspection updates"
.Body = "Please refer to the attachments regarding changes and updates to the inspection operational procedures, effective from 01/04/2012. Please circulate to all relevant personnel."
.Attachments.Add "D:\Inspection Presentation (FY12).pdf"
.Attachments.Add "D:\2012 Supplier update letter.pdf"
.Send
End With
Set objMailItem = Nothing
Set objOutlook = Nothing
DoCmd.GoToRecord , , acNext
Loop
End Sub