Email or fax report to multiple people

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

Guest

Good Morning!

This is my second strange question of the day :-). I have a report in my
database called quote. I have the user pick from a list of people to send the
quote to (could be 3, 5, 15, etc. different companis at once). Then, when I
call up the report, it creates the quote, customized with each companies
data, each on a seperate page.

My question is this. Is there a way for me to give the user the ability to
fax or email each companies quote to them individually (so they only get the
page customized to their company), through Outlook or maybe Microsoft's
faxing program?

Thanks for any help you can offer
Kim
 
Kim:

Below is some sample code that shows one alternative for accomplishing this
task. Since I do not know all the specifics regarding your reports or
tables, you will have to adjust this to your circumstances.

Function SendReports()
Dim rs As dao.Recordset

'Get a list of companies and there email addresses. You could
substitute the query behind the report, rather than using "MyTable"
Set rs = CurrentDb.OpenRecordset("SELECT Company, Email FROM MyTable;")

Do Until rs.EOF
'Use the OpenReport method to filter the report for each company
DoCmd.OpenReport "MyReport", acViewPreview, , "Company='" &
rs("Company") & "'"
'Use the SendObject method to email the active report
DoCmd.SendObject acSendReport, "", acFormatSNP, rs("Email"), , ,
"Quarterly Report for " & rs("Company"), "Some Text", False
'Close the report and get the next company name
DoCmd.Close acReport, "MyReport", acSaveNo
rs.MoveNext
Loop

Set rs = Nothing

End Function

You can also use the SendObject method to fax reports. The following KB
article shows how construct the SendObject method for sending a fax.

http://support.microsoft.com/default.aspx?scid=kb;en-us;299016

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.


Good Morning!

This is my second strange question of the day :-). I have a report in my
database called quote. I have the user pick from a list of people to send
the
quote to (could be 3, 5, 15, etc. different companis at once). Then, when I
call up the report, it creates the quote, customized with each companies
data, each on a seperate page.

My question is this. Is there a way for me to give the user the ability to
fax or email each companies quote to them individually (so they only get the
page customized to their company), through Outlook or maybe Microsoft's
faxing program?

Thanks for any help you can offer
Kim
 
Back
Top