PC Review


Reply
Thread Tools Rating: Thread Rating: 2 votes, 1.00 average.

Access Report Output to PDF (Acrobat)

 
 
=?Utf-8?B?SlJfMDYwNjIwMDU=?=
Guest
Posts: n/a
 
      2nd May 2006
I'm trying to automate the process of creating a PDF file from an Access
report. By automate I mean the user clicks on a button or menu choice.

Assume Acrobat (and thus Acrobat Distiller and Acrobat Writer) are
installed. I use the following code:

Dim prtFirst As Printer, stName As String
Dim rptCurrentReport As Report
stName = Printer.DeviceName
Set Printer = Printers("Acrobat PDFWriter")
Set rptCurrentReport = Screen.ActiveReport
Application.CurrentUser
DoCmd.PrintOut acPrintAll

When the code executes, the process appears to work, but then the output
disappears. Acrobat does not open as it would if I manually printed to
PDFWriter and a PDF output is no where to be found.

Is there a way to get the same results of manully printing to PDFWriter;
getting a dialog box which gives me the opportunity to designate a file name
and where the file is to be saved, and then opening the document in Acrobat?

 
Reply With Quote
 
 
 
 
Albert D.Kallal
Guest
Posts: n/a
 
      2nd May 2006
Actually, why don't you dump the use of Acrobat anyway.

Stephan has a routine which has the following features

You do not need to have, purchase, nor installed Acrobat
You do not need to try and change the default printer..since it is
not a printer drive

You would of course have to use some code to prompt the user for the output
file name..but that is *much* better then trying to use a printer, change
printer..and hope that the acrobat software is installed correctly...

You can find the free pdf creator code here....

http://www.lebans.com/reporttopdf.htm


--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
(E-Mail Removed)
http://www.members.shaw.ca/AlbertKallal


 
Reply With Quote
 
=?Utf-8?B?QW5keQ==?=
Guest
Posts: n/a
 
      2nd May 2006
I use a program which youcan purchase inexpensively on the net called Visage.
It allows you to print to a virtual PDF file and prompts you for a file name.

"Albert D.Kallal" wrote:

> Actually, why don't you dump the use of Acrobat anyway.
>
> Stephan has a routine which has the following features
>
> You do not need to have, purchase, nor installed Acrobat
> You do not need to try and change the default printer..since it is
> not a printer drive
>
> You would of course have to use some code to prompt the user for the output
> file name..but that is *much* better then trying to use a printer, change
> printer..and hope that the acrobat software is installed correctly...
>
> You can find the free pdf creator code here....
>
> http://www.lebans.com/reporttopdf.htm
>
>
> --
> Albert D. Kallal (Access MVP)
> Edmonton, Alberta Canada
> (E-Mail Removed)
> http://www.members.shaw.ca/AlbertKallal
>
>
>

 
Reply With Quote
 
SA
Guest
Posts: n/a
 
      2nd May 2006
Jr:

If you want to fix your code so that it prints but prompts, its pretty
simple, the code would look like this:

Dim objPrinter as Printer, objOrigPrinter as Printer
Dim strRptName as String

objOrigPrinter = Application.Printer
Set objPrinter = Printers("Acrobat PDFWriter")
Application.Printer = objPrinter
strRptName = Screen.ActiveReport.Name
'Assumes that report is in preview
DoCmd.SelectObject acReport, strRptName
DoCmd.PrintOut acPrintAll
DoEvents
Application.Printer = objOrigPrinter

On the other hand if you want to automate the output where the user doesn't
have to provide a file name or location (i.e. the app does it,) then take a
look at our PDF and Mail Library for Access, which works with Acrobat and
many other PDF printers. You'll find it in the Developer Tools area of our
web.
--
SA
ACG Soft
http://ourworld.compuserve.com/homepages/attac-cg


"JR_06062005" <(E-Mail Removed)> wrote in message
news084088B-32E4-42D8-AB96-(E-Mail Removed)...
> I'm trying to automate the process of creating a PDF file from an Access
> report. By automate I mean the user clicks on a button or menu choice.
>
> Assume Acrobat (and thus Acrobat Distiller and Acrobat Writer) are
> installed. I use the following code:
>
> Dim prtFirst As Printer, stName As String
> Dim rptCurrentReport As Report
> stName = Printer.DeviceName
> Set Printer = Printers("Acrobat PDFWriter")
> Set rptCurrentReport = Screen.ActiveReport
> Application.CurrentUser
> DoCmd.PrintOut acPrintAll
>
> When the code executes, the process appears to work, but then the output
> disappears. Acrobat does not open as it would if I manually printed to
> PDFWriter and a PDF output is no where to be found.
>
> Is there a way to get the same results of manully printing to PDFWriter;
> getting a dialog box which gives me the opportunity to designate a file
> name
> and where the file is to be saved, and then opening the document in
> Acrobat?
>



 
Reply With Quote
 
Albert D.Kallal
Guest
Posts: n/a
 
      2nd May 2006
"Andy" <(E-Mail Removed)> wrote in message
news:71BBEDCB-A4CE-465B-892C-(E-Mail Removed)...
>I use a program which youcan purchase inexpensively on the net called
>Visage.
> It allows you to print to a virtual PDF file and prompts you for a file
> name.


Well, there are several inexpensively solutions. I use the folwing for
creating pdf files, and it is free.

It is absolutely Free,

And free means no watermarks, no nag screens, no annoying Popup
advertisements, no time limits etc.

It is also very fast, and works very well. I highly recommend it.

http://www.acrosoftware.com/products...df/Printer.asp


However, Visage, or cutepdf prompts you for a file name. Further, both
requite you to install software, and setup a printer driver.

Stephens solution is much better, since not only is it free, but you DO NOT
have to install the software either. (thus, re-distribution is easy..and you
don't even has to install a pdf printer).


--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
(E-Mail Removed)
http://www.members.shaw.ca/AlbertKallal


 
Reply With Quote
 
=?Utf-8?B?SlJfMDYwNjIwMDU=?=
Guest
Posts: n/a
 
      3rd May 2006
I used the software and it works--almost. I'm printing a report landscape on
legal paper. It losses the fromatting in some of the columns on the right
side of the page. I tried creating a snapshot file and then PDF manually
and that works. But for reason the program changes some of the report
formatting.

"Albert D.Kallal" wrote:

> Actually, why don't you dump the use of Acrobat anyway.
>
> Stephan has a routine which has the following features
>
> You do not need to have, purchase, nor installed Acrobat
> You do not need to try and change the default printer..since it is
> not a printer drive
>
> You would of course have to use some code to prompt the user for the output
> file name..but that is *much* better then trying to use a printer, change
> printer..and hope that the acrobat software is installed correctly...
>
> You can find the free pdf creator code here....
>
> http://www.lebans.com/reporttopdf.htm
>
>
> --
> Albert D. Kallal (Access MVP)
> Edmonton, Alberta Canada
> (E-Mail Removed)
> http://www.members.shaw.ca/AlbertKallal
>
>
>

 
Reply With Quote
 
=?Utf-8?B?SlJfMDYwNjIwMDU=?=
Guest
Posts: n/a
 
      3rd May 2006
The script does not work. If I change line 4 from
Application.Printer = objPrinter
to
Set Application.Printer = objPrinter

It works, but sends the file to the printer rather than create a PDF.

"SA" wrote:

> Jr:
>
> If you want to fix your code so that it prints but prompts, its pretty
> simple, the code would look like this:
>
> Dim objPrinter as Printer, objOrigPrinter as Printer
> Dim strRptName as String
>
> objOrigPrinter = Application.Printer
> Set objPrinter = Printers("Acrobat PDFWriter")
> Application.Printer = objPrinter
> strRptName = Screen.ActiveReport.Name
> 'Assumes that report is in preview
> DoCmd.SelectObject acReport, strRptName
> DoCmd.PrintOut acPrintAll
> DoEvents
> Application.Printer = objOrigPrinter
>
> On the other hand if you want to automate the output where the user doesn't
> have to provide a file name or location (i.e. the app does it,) then take a
> look at our PDF and Mail Library for Access, which works with Acrobat and
> many other PDF printers. You'll find it in the Developer Tools area of our
> web.
> --
> SA
> ACG Soft
> http://ourworld.compuserve.com/homepages/attac-cg
>
>
> "JR_06062005" <(E-Mail Removed)> wrote in message
> news084088B-32E4-42D8-AB96-(E-Mail Removed)...
> > I'm trying to automate the process of creating a PDF file from an Access
> > report. By automate I mean the user clicks on a button or menu choice.
> >
> > Assume Acrobat (and thus Acrobat Distiller and Acrobat Writer) are
> > installed. I use the following code:
> >
> > Dim prtFirst As Printer, stName As String
> > Dim rptCurrentReport As Report
> > stName = Printer.DeviceName
> > Set Printer = Printers("Acrobat PDFWriter")
> > Set rptCurrentReport = Screen.ActiveReport
> > Application.CurrentUser
> > DoCmd.PrintOut acPrintAll
> >
> > When the code executes, the process appears to work, but then the output
> > disappears. Acrobat does not open as it would if I manually printed to
> > PDFWriter and a PDF output is no where to be found.
> >
> > Is there a way to get the same results of manully printing to PDFWriter;
> > getting a dialog box which gives me the opportunity to designate a file
> > name
> > and where the file is to be saved, and then opening the document in
> > Acrobat?
> >

>
>
>

 
Reply With Quote
 
Stephen Lebans
Guest
Posts: n/a
 
      3rd May 2006
Can you send me your MDB containing the problem report so I can debug here?

The issue you describe sounds like it matches one from an older release of
the StrStorage.DLL file. I've seen cases where people download the newer
version and forget to delete the older version that they copied to their
Windows\System folder.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.


"JR_06062005" <(E-Mail Removed)> wrote in message
news:E19C2DB9-03AF-4902-B7B6-(E-Mail Removed)...
>I used the software and it works--almost. I'm printing a report landscape
>on
> legal paper. It losses the fromatting in some of the columns on the right
> side of the page. I tried creating a snapshot file and then PDF manually
> and that works. But for reason the program changes some of the report
> formatting.
>
> "Albert D.Kallal" wrote:
>
>> Actually, why don't you dump the use of Acrobat anyway.
>>
>> Stephan has a routine which has the following features
>>
>> You do not need to have, purchase, nor installed Acrobat
>> You do not need to try and change the default printer..since it
>> is
>> not a printer drive
>>
>> You would of course have to use some code to prompt the user for the
>> output
>> file name..but that is *much* better then trying to use a printer, change
>> printer..and hope that the acrobat software is installed correctly...
>>
>> You can find the free pdf creator code here....
>>
>> http://www.lebans.com/reporttopdf.htm
>>
>>
>> --
>> Albert D. Kallal (Access MVP)
>> Edmonton, Alberta Canada
>> (E-Mail Removed)
>> http://www.members.shaw.ca/AlbertKallal
>>
>>
>>



 
Reply With Quote
 
=?Utf-8?B?SlJfMDYwNjIwMDU=?=
Guest
Posts: n/a
 
      4th May 2006
I'm not sure how to send it to you.

"Stephen Lebans" wrote:

> Can you send me your MDB containing the problem report so I can debug here?
>
> The issue you describe sounds like it matches one from an older release of
> the StrStorage.DLL file. I've seen cases where people download the newer
> version and forget to delete the older version that they copied to their
> Windows\System folder.
>
> --
>
> HTH
> Stephen Lebans
> http://www.lebans.com
> Access Code, Tips and Tricks
> Please respond only to the newsgroups so everyone can benefit.
>
>
> "JR_06062005" <(E-Mail Removed)> wrote in message
> news:E19C2DB9-03AF-4902-B7B6-(E-Mail Removed)...
> >I used the software and it works--almost. I'm printing a report landscape
> >on
> > legal paper. It losses the fromatting in some of the columns on the right
> > side of the page. I tried creating a snapshot file and then PDF manually
> > and that works. But for reason the program changes some of the report
> > formatting.
> >
> > "Albert D.Kallal" wrote:
> >
> >> Actually, why don't you dump the use of Acrobat anyway.
> >>
> >> Stephan has a routine which has the following features
> >>
> >> You do not need to have, purchase, nor installed Acrobat
> >> You do not need to try and change the default printer..since it
> >> is
> >> not a printer drive
> >>
> >> You would of course have to use some code to prompt the user for the
> >> output
> >> file name..but that is *much* better then trying to use a printer, change
> >> printer..and hope that the acrobat software is installed correctly...
> >>
> >> You can find the free pdf creator code here....
> >>
> >> http://www.lebans.com/reporttopdf.htm
> >>
> >>
> >> --
> >> Albert D. Kallal (Access MVP)
> >> Edmonton, Alberta Canada
> >> (E-Mail Removed)
> >> http://www.members.shaw.ca/AlbertKallal
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ACCESS 2003 / adobe Acrobat Professional 7.0 Report Problem Neal0o via AccessMonster.com Microsoft Access 1 19th Jan 2007 08:33 AM
Access Report Output to PDF (Acrobat) =?Utf-8?B?SlJfMDYwNjIwMDU=?= Microsoft Access Reports 8 4th May 2006 01:17 PM
Combining Access Reports into One Report using Acrobat Distiller Heather Microsoft Access Reports 2 19th May 2004 03:39 PM
Re: report output to pdf w/ acrobat 6 sli Microsoft Access Reports 0 16th Sep 2003 04:03 PM
Re: report output to pdf w/ acrobat 6 SA Microsoft Access Reports 0 15th Jul 2003 12:18 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:27 PM.