S
Sajid
Hi,
I've an Access report which prints to "Adobe Distiller"
printer. Just after the docmd.openReport function, I wish
to send that generated file as an email. Here is the code
that I'm using :
======================================================
' Send the Report to an Adobe Distiller printer
DoCmd.OpenReport rptName, acViewNormal
' The following function just sends an email, attaching
the newly generated pdf file (as denoted by filepath)
SendEmail ToAdd,FromAdd,Subj,bdy,filepath
======================================================
The above code works nicely except that it sends
an "incomplete" pdf file as an attachment.
After running the docmd.openReport code, adobe distiller
starts generating the pdf file. In the next line of code,
I am attching the file (the file is still in progress and
not YET complete). As a result, a corrupt or incomplete
file is send as an attachment.
My question is that is there a way in MS Access to
determine the status of the printer job in the tray? I
would like to wait till the pdf file is generated before
tying to send it via email.
Any help would be appreciated.
TIA
Sajid
I've an Access report which prints to "Adobe Distiller"
printer. Just after the docmd.openReport function, I wish
to send that generated file as an email. Here is the code
that I'm using :
======================================================
' Send the Report to an Adobe Distiller printer
DoCmd.OpenReport rptName, acViewNormal
' The following function just sends an email, attaching
the newly generated pdf file (as denoted by filepath)
SendEmail ToAdd,FromAdd,Subj,bdy,filepath
======================================================
The above code works nicely except that it sends
an "incomplete" pdf file as an attachment.
After running the docmd.openReport code, adobe distiller
starts generating the pdf file. In the next line of code,
I am attching the file (the file is still in progress and
not YET complete). As a result, a corrupt or incomplete
file is send as an attachment.
My question is that is there a way in MS Access to
determine the status of the printer job in the tray? I
would like to wait till the pdf file is generated before
tying to send it via email.
Any help would be appreciated.
TIA
Sajid