Re: Create macro which automaticallly creates PDF of a report
- From: "Ken Snell \(MVP\)" <kthsneisllis9@xxxxxxxxxxxxxxxxxx>
- Date: Tue, 25 Jul 2006 20:50:06 -0400
I haven't used Stephen's tool, so I cannot suggest an approach. May I
suggest that you post a new question about the use of the tool? Stephen or
others who've used it are more likely to see your question if you make a new
question.
--
Ken Snell
<MS ACCESS MVP>
"ChuckW" <haji@xxxxxxxxxxx> wrote in message
news:2B94E8A8-7ABE-4D2B-B6FD-C090BC899D2A@xxxxxxxxxxxxxxxx
Ken,
Thanks for your help. I actually downloaded and install the lebans
application. It will automatically convert a report into a pdf file. It
has
a form in it that lists all of the reports available. There is a button
at
the bottom that says "Click here to save this report as a pdf file". When
I
click this button it opens the report in pdf format. What I really want
to
do is the run this entirely in batch mode. I want to set up a scheduled
task
so that at 6:00 am, the pdf file will be created and then saved to a
certain
file. Any idea how I go from have to manully click on a report listed on
a
form and manually saving the file to a certain folder to actually doing
this
as a scheduled task? The report would be done once a week and would have
the
same name and location every week.
Thanks,
Chuck W
"Ken Snell (MVP)" wrote:
If the PC on which your database runs has the CutePDF printer set as the
default printer, then all you need do is print the reports (macro action
OpenReport); they'll be printed to PDF format. I haven't used CutePDF in
a
while, so I don't recall if it requires user intervention for naming the
file that is to be created -- if it does, a user would need to be
involved
when the macro is executing.
Otherwise, Stephen Lebans has a neat PDF utility for creating PDF
files --
haven't used it, but other MVPs have raved about its usefulness and
versatility. See http://www.lebans.com/reporttopdf.htm for the info and
code. This will require use of VBA programming, not macro, although you
can
run VBA code from a macro using the RunCode action that calls a public
function that then runs the desired VBA code.
Let us know what you decide you want to try to do.
--
Ken Snell
<MS ACCESS MVP>
"ChuckW" <haji@xxxxxxxxxxx> wrote in message
news:11EA5223-91BD-4950-AFE9-8604AD556371@xxxxxxxxxxxxxxxx
Ken,
Thanks for your help. I have a main database that many people use and
I
am
attempting to create a separate database whose sole purpose is to
create
files based on reports. I have an autoexec macro that imports tables
in
from the main database and I have scheduled it to run every day. I
have
imported various queries and reports from the main database as well. I
want
to schedule this to run in the morning on our fileserv. We do have a
write called Cute PDF which is a free writer I downloaded and installed
on
our server. So I won't need to applicatioin to switch the printer back
and
forth. I only need it to print a report. I want to include this is
part
of
my autoexec macro. How would I imbed code into this macro and should I
still
use the code you were suggesting?
Thanks,
Chuck
--
Chuck W
"Ken Snell (MVP)" wrote:
You'll need a PDF printer driver to be installed on your machine. Then
you'll need to use VBA code (not a macro) to change the printer
assignment
to the PDF driver, print the report, and then change the printer back
to
the
default printer. Note that this will work using Application.Printers
object
in ACCESS 2002 and 2003.
--
Ken Snell
<MS ACCESS MVP>
"ChuckW" <haji@xxxxxxxxxxx> wrote in message
news:27A2E8D0-4711-4469-9F53-74BBE95BEA66@xxxxxxxxxxxxxxxx
Hi,
I want to create a macro that when run will automatically create a
of
an
access report and save it to a certain folder. Can someone help?
Thanks,
--
Chuck W
.
- References:
- Re: Create macro which automaticallly creates PDF of a report
- From: Ken Snell \(MVP\)
- Re: Create macro which automaticallly creates PDF of a report
- From: Ken Snell \(MVP\)
- Re: Create macro which automaticallly creates PDF of a report
- From: ChuckW
- Re: Create macro which automaticallly creates PDF of a report
- Prev by Date: Re: If Statement in Access Report
- Next by Date: Re: =Sum(Abs([field]="Value")*[Field]
- Previous by thread: Re: Create macro which automaticallly creates PDF of a report
- Next by thread: Re: Create macro which automaticallly creates PDF of a report
- Index(es):