I have not tried this before but this is what I came up with.
Setup your report to print to your distiller.
Setup the distiller to not ask for a file name or warn about overwriting. It
should create a file name on your local drive based on the report name.
Use one of the next 2 function to print and email the report
*************
Public Function PrintPDFemail1()
' This will create the PDF if the report is setup for it
DoCmd.OpenReport "rptJobItemStat", acViewNormal
' This command will create the email message and preview it but will NOT
attach the pdf file
DoCmd.SendObject , , acFormatTXT, "so*****@email.com", , , "Job Items",
"Attached is a PDF file", True
End Function
******************
This function will send the attachement without allowing you to preview it
or the email. Maybe someone in this group knows how to setup the email and
open the message for preview.
Public Function PrintPDFemail2()
' This will create the PDF if the report is setup for it
DoCmd.OpenReport "rptJobItemStat", acViewNormal
' The following I got from others in this group to send the email with
the attachment
Dim strEmail As String
Dim strMsg As String
Dim oLook As Object
Dim oMail As Object
Set oLook = CreateObject("Outlook.Application")
Set oMail = oLook.createitem(0)
With oMail
.to = "so*****@email.com"
.body = "Attached is a PDF file for your viewing"
.Subject = "Job Item"
.Attachments.Add ("C:\Documents and
Settings\ron_m\Desktop\rptJobItemStat.pdf")
.Send
End With
Set oMail = Nothing
Set oLook = Nothing
End Function
"Daedalus" <FD********@hotmail.com> wrote in message
news:cJ**********************@phobos.telenet-ops.be...
Hi Ron
Tanx 4 your reply. I happen 2 have Acrobat Distiller version 6.0. I hope u
can provide me with a sample showing how to do it exactly, since I really
don't know how 2 pass the report to the Distiller. I just tried to a
report using docmd.openreport and docmd.outputto, but I don't manage 2 produce a
file. I guess that's the way 2 do it : create a temp file, and then attach
it ?
Tanx already !
D
"paii, Ron" <pa**@packairinc.com> wrote in message
news:vq************@corp.supernews.com... Simplest would be to use File Send to generate a RTF file as a email
attachment, you will lose any graphical elements of your report.
Use File Send to generate a Access viewer file as a email attachment.
Your vendors will need to install the viewer but they will see the report as
you formatted it. I recall some problems posted here about availability of
this view.
If you have Acrobat distiller you could print a Acrobat file and have
Access send it as a attachment. It is very likely your vendors have Acrobat
reader.
"Daedalus" <FD********@hotmail.com> wrote in message
news:eI**********************@phobos.telenet-ops.be... Hi
My A2k db generates faxes through Winfax. Is there a possibility to
replace this by mail, taking into account the layout must be the same as on
the faxes ?
It's used mainly used for price-inquiries from suppliers, and make
quotations to customers.
Tanx in advance !
D