Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mass Email

Status
Not open for further replies.

tdin

MIS
Jun 1, 1999
11
0
0
US
I have a table with a field that holds a contacts email address. I would like to send a message to all the contacts in that table. Is there a way I can use the address stored in the table to automatically send this message? Thanks in advance.
 
using this code you're able to send an email:

Public objOutl As New Outlook.Application ' <- needs a reference !
Function CreateEmail(strRecipient As String)
Dim dummy As Long
Dim itmOutl As MailItem
Dim tmpOutl As Outlook.Application

On Error Resume Next
Set tmpOutl = GetObject(, &quot;Outlook.Application&quot;)
If Err.Number <> 0 Then
Set objOutl = New Outlook.Application
Err.Clear
Else
Set objOutl = tmpOutl
End If
On Error GoTo 0
Set itmOutl = objOutl.CreateItem(olMailItem)
itmOutl.Display False
itmOutl.Recipients.Add strRecipient
'itmOutl.Send
End Function
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top