Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
| Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 31st, 2008, 05:12 PM
Registered User
Points: 49, Level: 1
Points: 49, Level: 1 Points: 49, Level: 1 Points: 49, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2008
Location: , , .
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default mutiple email merge to outlook

im using ms access and outlook 2003

i have a query wich i run, and it brings me a list of customers with details. im more concerned with the email addresses. i want to send an email to mutiple recipients. (the one's searched for)

i can use a piece of code, but it only adds the first email address, can anyone help me to get this code to add the next email adresses of the people down the table.

im not very good with loops

Private Sub SendAnEmail_Click()
On Error GoTo ErrorHandler
Dim objOutlook As Object 'Outlook.Application
Dim EmailAddress As String

Set objOutlook = CreateObject("Outlook.Application")
Set objMailItem = objOutlook.CreateItem(0)

DoCmd.RunCommand acCmdSaveRecord
EmailAddress = Me!EMail
With objMailItem

.To = EmailAddress
.Subject = "Subject Here"
.body = "email text Here"
.display

End With

Exit Sub
ErrorHandler:
MsgBox "Error Number:" & Err.Number & "" & Err.Description

End Sub

Help!!!:(

Joey






Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlook email through Access desireemm Access 1 August 26th, 2005 11:31 AM
Access email blocked by Outlook access Access 3 June 16th, 2005 07:23 AM
Outlook Email Fomatting roguedog Access 1 February 1st, 2005 05:02 PM
Sending an email without Outlook SaharaWizard Pro VB 6 3 August 12th, 2004 04:15 PM
Email using Outlook Ben Access VBA 3 January 30th, 2004 05:39 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.