Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
| FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
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"

End With

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

End Sub



Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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

All times are GMT -4. The time now is 05:52 AM.

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