Link to home
Start Free TrialLog in
Avatar of HARRY222
HARRY222

asked on

How to capture a document sent to a specific printer

I need to capture and save (into a database table) a document, sent to a specific printer on a network.  The document is an ms - access report. Thanks in advance.
SOLUTION
Avatar of peter57r
peter57r
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
it maybe possible if you control the viewing and printing of reports using a form.

 give more info...
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
<No Points wanted>

What you seem to be needing here is a "Snapshot" of the report.

In the old days, you would have created a "Snapshot File".

As Pete stated, PDF's are commonly used for this now...
If you are using Access 2007 or newer this is easy (with Access 2007 you have to install the PDF add-in)

Try putting code like this on your "Print" button:

Dim strReportName As String
strReportName = "rptSortYear"
'Print the Report
DoCmd.OpenReport strReportName
'Save the report as a PDF
DoCmd.OutputTo acOutputReport, strReportName, acFormatPDF, "C:\YourFolder\" & strReportName & ".pdf"
'Optional, Close the report
'DoCmd.Close acReport, strReportName

If you are using a version of Access prior to 2007 this will require an intermediate step (calling the code to create the PDF) but the principal will be the same...

Keep us posted...

;-)

JeffCoachman
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of HARRY222
HARRY222

ASKER

Thanks for reply. I'll try to explain. For every page than i print from my ms-access report there is a "blind box" -between my PC and printer - that adds to my printed page a text line. This line is different for every page i print. I need to capture my printed page with text line and to store it into a database with an ID.
I want to do that in order to print later the stored page (as a copy) with the text line. Thanks in advance.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial