By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,136 Members | 1,784 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,136 IT Pros & Developers. It's quick & easy.

Access Query results to outlook

P: n/a
I am new to Access, but I find this answer a little difficult to
understand. I have an access query that list late work, I want to run
the query and let say the results is ten records. I want one email for
each record. The query has the name of the employee and the supervisor,
the title of the work and so on. I want the employee and supervisor to
be emailed. The name to email can be looked up from another table.

I see on MS sites such code as modules, SendMessage, and it works fine.
What I do not understand is how to get the results from the query
parsed (for each row) and sent that to the module? I think the parsed
row should be tokened and that would give me some of the email
information, email subject and body.

Hope I explained it... Any suggestions?

Douglas

Nov 17 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Have a look at the Email Senate sample database on his website which
does
exactly what you want:

===========================
http://www.datastrat.com/Download/EmailSenate2K.zip
BTW, this was recoded from an old database so many of the Senate email
addresses are no longer valid.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
===========================

Ron

Nov 17 '06 #2

P: n/a
MLH
I like the gyst of it. When I launched the process, I get an outlook
express compose window properly composed with the body text
and the HTML attached - but the To: field is void of any email
address. Looking at the code, I see that's that's exactly what it's
supposed to do. Its a useful app, no doubt about that. Of course,
one can easily cut 'n paste it email address from where it appears in
the body text or select it the usual way within OE. I like it!

I've used Lebans' PDF generator code a good bit to create reports
as PDF's that can be attached & sent. Has anyone modified (with
Arvin's permission, of course) this code to attach a PDF in a similar
fashion?

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

>Have a look at the Email Senate sample database on his website which
does
exactly what you want:

===========================
http://www.datastrat.com/Download/EmailSenate2K.zip
BTW, this was recoded from an old database so many of the Senate email
addresses are no longer valid.
Nov 17 '06 #3

P: n/a
Thanks Ron:

I downloaded it and played with it. It does generate an email from a
form. I was looking to do it from a query. I want to run a query and it
process all the records that are late and send email directly.

d
On Nov 17, 5:38 am, "Ron2006" <ronne...@hotmail.comwrote:
Have a look at the Email Senate sample database on his website which
does
exactly what you want:

===========================http://www.datastrat.com/Download/EmailSenate2K.zip

BTW, this was recoded from an old database so many of the Senate email
addresses are no longer valid.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:http://www.datastrat.comhttp://www.mvps.org/access
===========================

Ron
Nov 20 '06 #4

P: n/a
Hi Douglas
I downloaded it and played with it. It does generate an email from a
form. I was looking to do it from a query. I want to run a query and it
process all the records that are late and send email directly.
I wrote an Mail Assistant app that works via DDE to do just this.

http://balance-infosystems.com/products/mail.assistant/

Example code is

With MailAssistant
.connect
If Not .connected Then
' try launching
.launch
.connect
End If
If .connected Then
'.verboseOff
.serverName "default"
.serverAddress "your.smtp.server.ip.or.address"
.serverPort "25"
.preferencesSave
'.verboseOn
.templateName ("approval to proceed")
.newHTMLMessage
.addressedFrom "from.addr...@your.domain"
.addressedTo "to.addr...@clients.domain" ' multiple
addresses separated by commas
.copiedTo "interested.parties@domains" ' multiple
addresses separated by commas
.blindCopiedTo "audit.addres...@your.dormain" ' multiple
addresses separated by commas
.messageSubject "Artwork Approval And Order Confirmation
for Job Number [JOB NUMBER]"
.messageData "[JOB NUMBER=G52636],[DATE=26th, July
2007],[SENDER NAME=Mary Joseph],[RECEIVER NAME=Joseph Mary],[APPROVAL
NUMBER=25635],[JOB DESCRIPTION=Some sort of job description],[JOB
QUANTITY=3000],[DATE TO BE DELIVERED=28th of July, 2006],[TOTAL
COST=5489.00], [PAYMENT TERMS=50% on Approval, 50% on Delivery],[SENDER
EMAIL=keith.hutchi...@balance-infosystems.com]"
.messageAttachments "rproxy.pdf" ' full path is normally
required, multiple attachments by separating by commas, attachment
dialog by pass an empty string
.messagesSend
'.verboseOff
Else
MsgBox "Unable to connect to Mail Assistant"
End If
.disconnect
End With

Regards

Keith

Nov 20 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.