print

J

Joel Allen

Hello,

In a macro, I have it opening a report. Is there a way to also make it
automaticall print to a html or pdf file?

Thanks,
Joel
 
S

Steve Schapel

Joel,

To use a macro to produce an html file from a report, use the OutputTo
action. Note that any graphics on the report will not be reproduced in
the html file, and there are other restrictions as well.

To print to a PDF, you will need a PDF writer utility installed on your
computer. If so, you can go to the design view of the report, and under
the File|Page Setup menu, you can set the PDF driver as the "specified
printer" to use for that report. Then, using the OpenReport action in
your macro will output the report to pdf.
 
J

Joel Allen

Thank you, this helps a great deal. Now, all I need to know is the code to
run a specific macro.
From a Data Access Page, I will have command buttom to run the maco. Will
you help please? Thanks so much.

Joel
 
S

Steve Schapel

Joel,

I am sorry, I am not familiar with DAPs. In an Access form, you would
simply go to the Properties of the command button, and enter the name of
the macro in the On Click event property. I am not sure whether it is a
similar process in a DAP.
 
J

Joel Allen

Thanks Steve.

Steve Schapel said:
Joel,

I am sorry, I am not familiar with DAPs. In an Access form, you would
simply go to the Properties of the command button, and enter the name of
the macro in the On Click event property. I am not sure whether it is a
similar process in a DAP.
 
K

Ken Snell \(MVP\)

You cannot run an ACCESS macro from a DAP. You must use VBScript in the
page's module in order to run any type of code/programming. You can use the
Click event of the command button to run a script -- but do note that
VBScript does not have all the capabilities of VBA; nor does it do debugging
very well (actually, does it very poorly); and it uses ADO recordsets, not
DAO ones.

You also cannot print reports from DAPs; you can print the DAP page itself.
 

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

Report duplicates 0
print name 2
print multiple reports 1
Steps for Printing 3
print view 1
Report Distribution 1
macro print to pdf 5
print a report as PDF 1

Top