RE: pdf file per record creation from form
- From: "gg" <gg@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 22 May 2005 21:06:03 -0700
We don't seem to be communicating. What I am trying to do is convert each
record in a form or a report to a matching unique pdf file by by clicking a
button on a master form. If I have 200 records, there will be 200 uniquely
named pdf files. I have no problem saving indiviual records in pdf using
code I developed. My problem is that my code doesn't work consistently on
a client's XP computer with access 2003. I developed code in access 2000 and
windows 2000. Is the problem the ambiguity of SendKeys command that I
described in first submittal? Is there a surer way to convert each record in
a report or form to a separate pdf file, each with a unique name?. You said
something in your first reply to the effect that it would be simple with
reports as opposed to forms. Please amplify.
"JaRa" wrote:
> Use this document:
> http://partners.adobe.com/public/developer/en/acrobat/sdk/pdf/pdf_creation_apis_and_specs/DistillerAPIReference.pdf
> This describes (bottom of page 20) how to set the destination path and
> filename by setting a registry key. This key will be active for the next
> document that is printed to the Adobe PDF printer.
>
> The complete process would look like this:
>
> set the registry key
> print to the Adobe PDF printer
> open the PDF file with the code that you already have so that you can modify
> it.
>
>
> Make sure that your report has the pdfwriter as default printer and you have
> to set the registry key before calling the docmd.openreport for each record.
>
> --
> - Raoul Jacobs
>
> The nature of developping is sharing knowledge.
>
>
> "gg" wrote:
>
> > Cold you be more specific, show essential code. It seems to me that I have
> > to use send keys if i don't want each record print to stop for a dialog box
> > I can easily change the form to a report. I am printing a record, not the
> > screen.
> >
> > Also, is there something about code that I don't know that would allow the
> > system to loop correctly for a dozen or so, then quit printing while still
> > cycling through the loop?
> >
> > "JaRa" wrote:
> >
> > > Are you trying to print a screen/form or a report?
> > >
> > > Because if it's a report then you can automate the whole thing.
> > > By printing it to the PDF Writer e.g. for adobe you can print automatically
> > > by setting the filename of the file before printing in the registry.
> > >
> > >
> > > --
> > > - Raoul Jacobs
> > >
> > > The nature of developping is sharing knowledge.
> > >
> > >
> > > "gg" wrote:
> > >
> > > > I am trying to save each record in a form, call it frmData, as a separate pdf
> > > > file with a name corresponding to a field on the master form. The purpose is
> > > > put pdf data on a web site with each pdf record accessible as a separate file.
> > > >
> > > > Without getting into detail, I do this:
> > > >
> > > > From the master form- I rename frmData to match field on master, say FieldName
> > > > Open form FieldName
> > > > SendKeys "%(f)pa~%(s)" to print to adobe
> > > > Close form FieldName
> > > > Rename FieldName back to frmData
> > > > Goto next record on master from (source of next Fieldname)
> > > > Loop until last record
> > > >
> > > > My problem is that it works fine on my computer (w2000 access 2000) but on
> > > > one user's computer, (xp, w2003), it will print the first 10 or so records,
> > > > then cycle all the way to the end withou printing any more files. Is there a
> > > > better way to do this? If not, do I have to do something different for
> > > > Access 2003?
> > > >
> > > >
.
- Follow-Ups:
- Re: pdf file per record creation from form
- From: John Nurick
- Re: pdf file per record creation from form
- References:
- pdf file per record creation from form
- From: gg
- RE: pdf file per record creation from form
- From: JaRa
- RE: pdf file per record creation from form
- From: gg
- RE: pdf file per record creation from form
- From: JaRa
- pdf file per record creation from form
- Prev by Date: Re: How do you code a check box to insert data into a table?
- Next by Date: add tab strip
- Previous by thread: RE: pdf file per record creation from form
- Next by thread: Re: pdf file per record creation from form
- Index(es):
Loading