Email PDF's Access 2010

ISBB

Board Regular
Joined
May 2, 2005
Messages
101
I have been reading and searching for a bit and found a few threads that kinda make sense. However they are based pretty much towards 2003 and 2007 and im trying to make something work in 2010.

Basically I have a couple simple tables and reports.

Table1: Company Data, Office # Names address's phone e-mail so on and so forth
Table2: Commissions table, Office # projects commission %'s and so on
Table3: Raw sales data, Office # Project date $amount

i have a report currently generated that groups by office number and summarizes and calculates commissions and sales data based on a given date range. This works all fine and dandy. What im trying to accomplish is: This report generates a single page for each group(office#) all balled into one document so page one is office1 page 2 is office2 so on and so forth. I want to be able to somehow send just page1 of this report to the e-mail address or address's to the corresponding office# And so on down the list.

Im by far a vba expert more like a vba noob. I learn by example and can usually manipulate something to make it work but writing raw code just isnt in my vocabulary for some reason. I have fiddled with the code snippets i have seen for 03 and 07 and am failing miserably so if anyone could lend a hand or some snippets i could manipulate to work with some explanations that would be great.

Thanks
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
i would settle for a button to print to pdf based on group id and date.. i can manually e-mail them. The longest part for me is generating the individual reports.
 
Upvote 0
I don't have 2010 to work/play with, but I do have a suggestion of a strategy that perhaps someone else could help with.

VBA code to 1) change the filter property of the report to group(office#), 2) export the single-page report as a pdf, 3) e-mail the pdf to the recipient, 4) kill the pdf file ... rinse and repeat until all group(office#) reports are generated and e-mailed.

Just an idea...
 
Upvote 0
that was basically the plan of attack i have seen posted pretty much in everything i read.. but im having a hell of a time adapting and wrapping my head around the concept.

First bit of code was to split the report
second priv/pub sub was to e-mail the report

But i didnt see anything mentioning any loops or anything in there so thats why im kinda bangin my head on the desk goin WTH lol. Im sure ill dig something up eventually.
 
Upvote 0
You could make a select query out of your group(office#) that you can use in your filter code to loop through the steps I described. If you use the filter property on the report, you could run the report for only the single group(office#) which should produce a 1-page report, right? So, after the filter is in place, export the PDF to a location on your computer then attach it to an e-mail and send it. You can do all of it in VBA. Then with a single click, all the reports and e-mails will be created and sent while you catch up on the local gossip at the water cooler.
 
Upvote 0

Forum statistics

Threads
1,224,542
Messages
6,179,424
Members
452,914
Latest member
echoix

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top