e-mailing reports

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a database that contains supervisors and their employees. I need each
supervisor to verify their list so I've created a report grouped by
supervisor. I would like to be able to e-mail each of them their respective
report, quickly and easily. There are 200+ supervisors - my database does
contain their e-mail address. I've done some reading on the "compound
merge", but haven't had much success getting it to work - in fact, Word locks
up every time I try to edit the field. So, I'm wondering if there is any
way to write a macro to do this directly from Access. Any ideas?
 
Excellent link. I am also looking for a macro, or code that will allow
sending reports to mulitple recipients. However, the content of the report
is different for each recipient. Is there any way to do this?
 
Without knowing the specifics, I think you could loop through the recordset
of "sendees", and calling the code at the link for each, with a different
selection criteria, or report specification, or both. Something like:

' Much of this code has been borrowed from Allen Browne
Sub MyProc()
On Error Goto Err_MyProc
Dim db as Database
Dim rst As Recordset

Set db = CurrentDb()
Set rst = db.OpenRecordset("MyTable")
Do While Not rst.EOF
' Put Record specific code here, in a Select Case block
' You may need to add a field to your table to identify which case
' should be used for each specific record
Loop
rst.Close 'Close what you opened.

Exit_MyProc:
Set rst = Nothing 'Deassign all objects.
Set db = Nothing
Exit Sub

Err_MyProc:
'Error handler here.
Resume Exit_MyProc
End Sub

HTH
Sprinks

P.S. to Allen Browne: I hope you're OK with me passing on your code. I'm
emailing you tonight re: same.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top