Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report Bursting

Status
Not open for further replies.

RptSm

MIS
Dec 28, 2004
19
US
Has anyone used Crystal Report Bursting? I have multiple letters that need to be distributed to about 100 managers. If not Crystal, Access?
 
I don't know anything about Crystal Report Bursting, but you could put the letter into Access and then make a table of all the e-mail addresses you need them sent to.

Then write code in an Access module that loops through the table and e-mails it to each person. If you need more detailed information, I can give that to you.

Good Luck!
 
Can you email me sample code? I written macros before but pretty simples ones. I appreciate your help.
 
If you have tblEmailAddresses with field Email.

In the module you would have the following:

Public Function SendEmail()
Dim rs as recordset
Dim emailVar as string

Set rs = currentdb.openrecordset("tblEmailAddresses")

With rs
.MoveFirst
Do Until .EOF
emailVar = !Email
DoCmd.SendObject acSendReport, "[OBJECTNAME]", acFormatRTF, emailVar, "CC", "BCC", "Subject", "Message Text", False
.MoveNext
Loop
End With
End Sub

This is some simple code. This would work if you had the same letter going to all 100 people. It would just loop through and send 100 e-mails with the same letter.

Now if you have a different letter for each person or maybe a different letter for a group of people, you would have to make a table with the object or letter names. Then when you find the next e-mail address, look up which object you want to send and place that by using a variable into the "[OBJECT NAME]" place. The "cc", "bcc", "Subject", "MessageText" can be removed. You will probably want to insert a Subject and a Message Text, but you will probably not need the "cc" or "bcc", I was just showing you the full placement of the Docmd.SendObject function.

Also I have this set to output acFormatRTF. That will display your report in a WORD document. There are options of HTML and others. Again, more detail in the SendObject function in Access.

If you need help you can go into Access help and look up SendObject. It gives you more detailed information.

I hope this is beneficial for you.

Thanks,
Pigster14
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top