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
news

084088B-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?
>