var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Vba to run a report and then email it?
I have a report that i have to run weekly and then email to 2 different groups.
I would like to change a paramater on the qry the report is based on, run the report and send as an attachment to a group via outlook.
I havent done much vba with access objects, but have sent emails with excel files using .net
any help appreciated
Hope this helps
'this sends an email without opening up each email
DoCmd.SendObject acSendReport, "YourReportName", acFormatSNP, xtAddress, , , msgtitle, msgbody
'this opens each mail item.
DoCmd.SendObject acSendReport, "YourReportName", acFormatSNP, xtAddress, , , msgtitle, msgbody, 0
'Use the following to validate which type of email you want to send to which group. For example you could change the msgtitle, msgbody or reportname
If emailtype = 1 then
Last edited by gavinfm; 12-06-05 at 10:00.