Hi everybody,
I've got following question:
I'm trying to send an E-Mail over VBA in Access with
this code:
Public Function Send_Mail(mysubject As String, textfeld As String, mailto As String)
Dim objGWApp As Application2
Dim objGWAccount As Account2
Dim objGWmsg As Message3
Set objGWApp = New Application2
Set objGWAccount = objGWApp.Login
Set objGWmsg = objGWAccount.MailBox.Messages.Add("GW.Message.Mail"
objGWmsg.BodyText = textfeld
objGWmsg.FromText = "ExVV-Datenbank"
objGWmsg.Subject = mysubject
objGWmsg.Recipients.Add (mailto)
objGWmsg.Send
Set objGWApp = Nothing
Set objGWAccount = Nothing
Set objGWmsg = Nothing
End Function
This is no problem, everything functions like i want,
but now, how can i add more then one recipient???
Do i have to add a second :
objGWmsg.Recipients.Add (xxxxxxx)
If yes, how can I resolve that this stays as
flexible as with one recipient??? This Function is
used by two or three other procedures, and i don't
know, how many recipients it will contain!!!
Can somebody help me with my problem
Greetins H-2-O
PS: Sorry, for the bad English
I've got following question:
I'm trying to send an E-Mail over VBA in Access with
this code:
Public Function Send_Mail(mysubject As String, textfeld As String, mailto As String)
Dim objGWApp As Application2
Dim objGWAccount As Account2
Dim objGWmsg As Message3
Set objGWApp = New Application2
Set objGWAccount = objGWApp.Login
Set objGWmsg = objGWAccount.MailBox.Messages.Add("GW.Message.Mail"
objGWmsg.BodyText = textfeld
objGWmsg.FromText = "ExVV-Datenbank"
objGWmsg.Subject = mysubject
objGWmsg.Recipients.Add (mailto)
objGWmsg.Send
Set objGWApp = Nothing
Set objGWAccount = Nothing
Set objGWmsg = Nothing
End Function
This is no problem, everything functions like i want,
but now, how can i add more then one recipient???
Do i have to add a second :
objGWmsg.Recipients.Add (xxxxxxx)
If yes, how can I resolve that this stays as
flexible as with one recipient??? This Function is
used by two or three other procedures, and i don't
know, how many recipients it will contain!!!
Can somebody help me with my problem
Greetins H-2-O
PS: Sorry, for the bad English