469,133 Members | 1,125 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,133 developers. It's quick & easy.

Email Multiple Reports

135 100+
I am currently using...
Expand|Select|Wrap|Line Numbers
  1.  DoCmd.SendObject acReport, BactPDF, acFormatPDF, Me.Text199, , , "BacT Results " & Me.Report_Heading 
...to email my report. I have now come up against a need to send multiple reports on a single email. How is this done? The SendObject command seems to be designed to only send one report per email. How do I send more than one pdf report on a single email? Ideas?

Thank You
Oct 15 '10 #1
5 3461
nico5038
3,080 Expert 2GB
Check out the code from pianoman in:
http://bytes.com/topic/access/answer...ment-using-vba

This will allow multiple attachments.

Nic;o)
Oct 15 '10 #2
MyWaterloo
135 100+
Thank You. That works... almost. The problem is that my files that need sending will not always have the same name. Is there anyway to have the file name pulled from a field on my form?

Expand|Select|Wrap|Line Numbers
  1. Set objectlookAttach = .Attachments.Add("C:\Temp\[Me.BacTName].pdf")
Where the data in the field [Me.BacTName] is what the file will be named. This code doesn't work like this, but it does show what I am trying to do.
Oct 15 '10 #3
NeoPa
32,164 Expert Mod 16PB
Nearly there :-) Try this instead :
Expand|Select|Wrap|Line Numbers
  1. Set objectlookAttach = .Attachments.Add("C:\Temp\" & Me.BacTName & ".pdf")
Oct 15 '10 #4
MyWaterloo
135 100+
Of course! Using "&". Thank you! It works fabulous now.
Oct 15 '10 #5
NeoPa
32,164 Expert Mod 16PB
No worries. Don't forget to set Nico's post as the Best Answer ;-)
Oct 15 '10 #6

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by Patrick Fisher | last post: by
2 posts views Thread by f_salazar | last post: by
1 post views Thread by CARIGAR | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.