Send email using groupwise & access table

joepineapples

Registered User.
Local time
Today, 22:30
Joined
Apr 28, 2006
Messages
29
My Table is called is called contacts. It has a fields that contain email addressess and contact names. I would like to be able to send everyone in this table a reminder email using groupwise.

I would need for the email to send them individually one at a time and not one email with eveyone's name on it.

I have this code I found elsewhere I was hoping that it could be adapted somehow to do my task.

Code:
Sub RunDemo()
'this is a sample usage routine
On Error GoTo Err_Handler
Dim strTemp As String
Dim varAttach(1) As Variant
Dim strRecTo(1, 0) As String
Dim lngCount As Long
Dim varProxies As Variant
Dim cGW As GW

varAttach(0) = "c:\command.com"
varAttach(1) = "c:\windows\readme.txt"

[COLOR="Red"]strRecTo(0, 0) = "<enter email>"[/COLOR]
strRecTo(1, 0) = "Full Name 1"

Set cGW = New GW
With cGW
  .Login
  .BodyText = "body"
  .Subject = "subj"
  .RecTo = strRecTo
  .FileAttachments = varAttach
  .FromText = "FromText"
  .Priority = "High"
  strTemp = .CreateMessage
  .ResolveRecipients strTemp
  If IsArray(.NonResolved) Then MsgBox "Some unresolved recipients."
  .SendMessage strTemp
  .DeleteMessage strTemp, True
End With

Exit_Here:
  Set cGW = Nothing
  Exit Sub

Err_Handler:
  MsgBox "Error " & Err.Number & ": " & Err.Description, vbCritical
  Resume Exit_Here

End Sub

Is there a way I could alter the code - I'm guessing its the bit I've highlighted in red - to do the job?

I would like to eventually run a query that would tie in with the date to automatically send reminders for outstanding tasks. But my first step is to be able to send them manually from my table.

Any help would much appriciated.

JP
 

Users who are viewing this thread

Back
Top Bottom