Hi,
I have this script (below) which I got from this forum but am not sure how to configure it, especially the last line.
I have a form for each personal record with an email field and a tag yes/no box. I have created a query called emailQuery, calling up the field called 'EmailAddress' if the tag box is yes.
I have linked the script in the BV editor to a button in a form which I want to use to to launch my mail window with the selected (tagged) email addresses placed into the BCC.
I do not need to add attachments - just plain text emails sent to selected recipients.
Can't for the life of me figure out how to get it to work. If anyone can help, I would be very grateful.
Thanks
Adrian
I use Access 2003
Dim stDocName As String
Dim stToName As String
Dim stCCName As String
Dim stBCCName As String
Dim stSubject As String
Dim stMessage As String
stDocName = "emailQuery" 'Below in Docmd insert acSendTable for table, acSendReport for report or acSendQuery for query
stToName = "EmailAddress" 'This could also be a field picked up by your query or report
stCCName = "Insert cc email adresses" 'This could also be a field picked up by your query or report
stBCCName= "Insert bcc email adresses" 'This could also be a field picked up by your query or report
stSubject = "Subject text"
stMessage = "Message" 'This could also be a field picked up by your query or report
DoCmd.SendObject(ObjectType, ObjectName, OutputFormat, To, Cc, Bcc, Subject, MessageText, EditMessage, TemplateFile)
I have this script (below) which I got from this forum but am not sure how to configure it, especially the last line.
I have a form for each personal record with an email field and a tag yes/no box. I have created a query called emailQuery, calling up the field called 'EmailAddress' if the tag box is yes.
I have linked the script in the BV editor to a button in a form which I want to use to to launch my mail window with the selected (tagged) email addresses placed into the BCC.
I do not need to add attachments - just plain text emails sent to selected recipients.
Can't for the life of me figure out how to get it to work. If anyone can help, I would be very grateful.
Thanks
Adrian
I use Access 2003
Dim stDocName As String
Dim stToName As String
Dim stCCName As String
Dim stBCCName As String
Dim stSubject As String
Dim stMessage As String
stDocName = "emailQuery" 'Below in Docmd insert acSendTable for table, acSendReport for report or acSendQuery for query
stToName = "EmailAddress" 'This could also be a field picked up by your query or report
stCCName = "Insert cc email adresses" 'This could also be a field picked up by your query or report
stBCCName= "Insert bcc email adresses" 'This could also be a field picked up by your query or report
stSubject = "Subject text"
stMessage = "Message" 'This could also be a field picked up by your query or report
DoCmd.SendObject(ObjectType, ObjectName, OutputFormat, To, Cc, Bcc, Subject, MessageText, EditMessage, TemplateFile)