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

Auto email a report

P: n/a
I have a form that contains a button which runs a report based on a
query. The code as far as I can tell is as follows:
*
Private Sub Email_Headend_Fiber_Click()
On Error GoTo Err_Email_Headend_Fiber_Click

Dim stDocName As String

stDocName = "New_Node_Notification_Report"
DoCmd.SendObject acReport, stDocName

Exit_Email_Headend_Fiber_Click:
Exit Sub

Err_Email_Headend_Fiber_Click:
MsgBox Err.Description
Resume Exit_Email_Headend_Fiber_Click

End Sub
*
Since I am emailing the same two people this information all the time,
I would like to have the report exported in excel (I now get a dialog
box that comes up where I have to choose from excel, snapshot, html,
etc.), auto addressed to the 2 parties and automatically sent out. Can
anyone explain how to do this? (what code to enter and where in the
commands above)

Thanks
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Look up the help for your DoCmd.SendObject acReport, stDocName command.
There are more options. You just need to define the remaining options then
you are good to go.

--
Dean Covey
www.coveyaccounting.com

MS-Office Certified:
http://www.microsoft.com/learning/mc...st/default.asp

"Gary" <ga**********@adelphia.com> wrote in message
news:8c**************************@posting.google.c om...
I have a form that contains a button which runs a report based on a
query. The code as far as I can tell is as follows:
*
Private Sub Email_Headend_Fiber_Click()
On Error GoTo Err_Email_Headend_Fiber_Click

Dim stDocName As String

stDocName = "New_Node_Notification_Report"
DoCmd.SendObject acReport, stDocName

Exit_Email_Headend_Fiber_Click:
Exit Sub

Err_Email_Headend_Fiber_Click:
MsgBox Err.Description
Resume Exit_Email_Headend_Fiber_Click

End Sub
*
Since I am emailing the same two people this information all the time,
I would like to have the report exported in excel (I now get a dialog
box that comes up where I have to choose from excel, snapshot, html,
etc.), auto addressed to the 2 parties and automatically sent out. Can
anyone explain how to do this? (what code to enter and where in the
commands above)

Thanks

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.