A
Arnaud V via AccessMonster.com
Hello,
Here is what I am doing
I am using the code that I found on internet to send email.
Now what I want to do is
1 I have a list of person in one query
2 I want to take those name from the query and put them in the send line of
my email.
how do I do that.
I could add them all toegether and create a new field whit the chain and then
use that in my logic but I was wondering if there was anything better
Also this logic doesn't save the message in my sent message (Lotus Notes)
Here is the code I use
Dim Maildb As Object 'The mail database
Dim UserName As String 'The current users notes name
Dim MailDbName As String 'THe current users notes mail database name
Dim MailDoc As Object 'The mail document itself
Dim Session As Object 'The notes session
Set Session = CreateObject("Notes.NotesSession")
UserName = "Arnaud Van Der Haegen/0G/Caterpillar"
MailDbName = "Arnaud Van Der Haegen/0G/Caterpillar"
Set Maildb = Session.GETDATABASE("", MailDbName)
If Maildb.ISOPEN = True Then
Else
Maildb.OPENMAIL
End If
Set MailDoc = Maildb.CREATEDOCUMENT
MailDoc.Form = "Memo"
Dim recip(25) As Variant
recip(0) = "Arnaud Van Der Haegen/0G/Caterpillar"
recip(1) = "Richard T Jones/0G/Caterpillar"
MailDoc.sendto = recip
MailDoc.Subject = "Invoice of 2-16630"
MailDoc.Body = "Please invoice the following amount fot this project"
MailDoc.SAVEMESSAGEONSEND = SaveIt
MailDoc.PostedDate = Now() 'Gets the mail to appear in the sent items
folder
MailDoc.SEND 0, recip
'Clean Up
Set Maildb = Nothing
Set MailDoc = Nothing
Set AttachME = Nothing
Set Session = Nothing
Set EmbedObj = Nothing
Thank you
Here is what I am doing
I am using the code that I found on internet to send email.
Now what I want to do is
1 I have a list of person in one query
2 I want to take those name from the query and put them in the send line of
my email.
how do I do that.
I could add them all toegether and create a new field whit the chain and then
use that in my logic but I was wondering if there was anything better
Also this logic doesn't save the message in my sent message (Lotus Notes)
Here is the code I use
Dim Maildb As Object 'The mail database
Dim UserName As String 'The current users notes name
Dim MailDbName As String 'THe current users notes mail database name
Dim MailDoc As Object 'The mail document itself
Dim Session As Object 'The notes session
Set Session = CreateObject("Notes.NotesSession")
UserName = "Arnaud Van Der Haegen/0G/Caterpillar"
MailDbName = "Arnaud Van Der Haegen/0G/Caterpillar"
Set Maildb = Session.GETDATABASE("", MailDbName)
If Maildb.ISOPEN = True Then
Else
Maildb.OPENMAIL
End If
Set MailDoc = Maildb.CREATEDOCUMENT
MailDoc.Form = "Memo"
Dim recip(25) As Variant
recip(0) = "Arnaud Van Der Haegen/0G/Caterpillar"
recip(1) = "Richard T Jones/0G/Caterpillar"
MailDoc.sendto = recip
MailDoc.Subject = "Invoice of 2-16630"
MailDoc.Body = "Please invoice the following amount fot this project"
MailDoc.SAVEMESSAGEONSEND = SaveIt
MailDoc.PostedDate = Now() 'Gets the mail to appear in the sent items
folder
MailDoc.SEND 0, recip
'Clean Up
Set Maildb = Nothing
Set MailDoc = Nothing
Set AttachME = Nothing
Set Session = Nothing
Set EmbedObj = Nothing
Thank you