pdf send

R

rml

I'm using the below code to create an e-mail with a pdf attachment. It works
just fine. Does anyone know how I can send two attachments?

"Reportpdf1 & Reportpdf2" Thanks.

DoCmd.SendObject acSendForm, "Reportpdf", acFormatPDF, Me![cemail],
Me![demail], "(e-mail address removed)", "Results - ID Number " & Me![id number],
"Attached are your results for Report ID - "
 
S

Stuart McCall

rml said:
I'm using the below code to create an e-mail with a pdf attachment. It
works
just fine. Does anyone know how I can send two attachments?

"Reportpdf1 & Reportpdf2" Thanks.

DoCmd.SendObject acSendForm, "Reportpdf", acFormatPDF, Me![cemail],
Me![demail], "(e-mail address removed)", "Results - ID Number " & Me![id number],
"Attached are your results for Report ID - "

SendObject will only allow one attachment. But you could put both files in a
zip file and send that.
 
T

Tony Toews [MVP]

rml said:
I'm using the below code to create an e-mail with a pdf attachment. It works
just fine. Does anyone know how I can send two attachments?

"Reportpdf1 & Reportpdf2" Thanks.

DoCmd.SendObject acSendForm, "Reportpdf", acFormatPDF, Me![cemail],
Me![demail], "(e-mail address removed)", "Results - ID Number " & Me![id number],
"Attached are your results for Report ID - "

As Stuart states that is one of the many limitations of SendObject.

SendObject's twenty limitations
http://www.granite.ab.ca/access/email/sendobject.htm

If you want to send them inside a ZIP file you can do so using the
free open source InfoZip dlls as per the links found on the following
page.

Compression DLLs, OCXs, etc
http://www.granite.ab.ca/access/compression.htm

You can also combine PDF files into one file using the Lebans
solution. You'll have to do a bit of digging through the code to find
the one line of code required but it's there. Along with all the
support code of course.

A2000ReportToPDF is an Access 2000 database containing a function to
convert Reports and Snapshot files to PDF documents. No PDF Printer
driver is required. Free.
http://www.lebans.com/reporttopdf.htm

Tony
 
R

rml

Could you show me an example of how to send two files to a zip with code?

Thanks for your help.

Stuart McCall said:
rml said:
I'm using the below code to create an e-mail with a pdf attachment. It
works
just fine. Does anyone know how I can send two attachments?

"Reportpdf1 & Reportpdf2" Thanks.

DoCmd.SendObject acSendForm, "Reportpdf", acFormatPDF, Me![cemail],
Me![demail], "(e-mail address removed)", "Results - ID Number " & Me![id number],
"Attached are your results for Report ID - "

SendObject will only allow one attachment. But you could put both files in a
zip file and send that.
 
M

Mark Andrews

You could easily use a third party SMTP component. They support multiple
attachments, HTML emails and almost anything you would need.

Here's an example of a product I built using Ostrosoft SMTP component (there
are numerous ones on the market, most are free to approx $50):
http://www.rptsoftware.com/products/email/

HTH,
Mark Andrews
RPT Software
http://www.rptsoftware.com

Arvin Meyer MVP said:
SendObjects only allows a single attachment. If you are using Outlook, the
following code will work for as many attachments as you wish:

http://www.datastrat.com/Code/OutlookEmail.txt
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


rml said:
I'm using the below code to create an e-mail with a pdf attachment. It
works
just fine. Does anyone know how I can send two attachments?

"Reportpdf1 & Reportpdf2" Thanks.

DoCmd.SendObject acSendForm, "Reportpdf", acFormatPDF, Me![cemail],
Me![demail], "(e-mail address removed)", "Results - ID Number " & Me![id number],
"Attached are your results for Report ID - "
 
S

Stuart McCall

rml said:
Could you show me an example of how to send two files to a zip with code?
<snip>

I recommend you look at the free zip library offerings that Tony mentioned.

However, as Mark suggested, you could go the SMTP route. The following is a
link to an Access demo which contains an importable Class Module for the
purpose. You will need to know your SMTP server's name and login details,
which can be obtained from your Tech.
 
A

Arvin Meyer MVP

These newsgroups are for providing free assistance to Microsoft customers.
Sometimes a commercial product is the answer. In this case, not necessarily.
SMTP is a more complex solution to a simple problem. If the OP requests a
free SMTP solution, I'll post it here.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


Mark Andrews said:
You could easily use a third party SMTP component. They support multiple
attachments, HTML emails and almost anything you would need.

Here's an example of a product I built using Ostrosoft SMTP component
(there are numerous ones on the market, most are free to approx $50):
http://www.rptsoftware.com/products/email/

HTH,
Mark Andrews
RPT Software
http://www.rptsoftware.com

Arvin Meyer MVP said:
SendObjects only allows a single attachment. If you are using Outlook,
the following code will work for as many attachments as you wish:

http://www.datastrat.com/Code/OutlookEmail.txt
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


rml said:
I'm using the below code to create an e-mail with a pdf attachment. It
works
just fine. Does anyone know how I can send two attachments?

"Reportpdf1 & Reportpdf2" Thanks.

DoCmd.SendObject acSendForm, "Reportpdf", acFormatPDF, Me![cemail],
Me![demail], "(e-mail address removed)", "Results - ID Number " & Me![id number],
"Attached are your results for Report ID - "
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top