|
-
Oct 9th, 2005, 01:11 AM
#1
Thread Starter
Fanatic Member
How to specify path to PDF Writer
Hello, all, this is driving me nuts, so I thought I'd give the gurus a try.
I have a VB6 program which opens an access 97 database and prints a report to PDF. The program will run fine all the way up until it needs to save the PDF at which point the save as dialogue box comes up. I've searched this forum and the net for answers but to no avail. Is there a way to specify the path at which the Adobe PDF writer saves the PDF to in the code? Here is my code below:
VB Code:
Sub Main()
'Reference to MS Access 97 library
Dim X As Long
Dim prt As Printer
Dim acc As Access.Application
Dim rpt As Report
For Each prt In Printers
If Printers(X).DeviceName = "Acrobat PDFWriter" Then Exit For
X = X + 1
Next
Set prt = Printers(X)
Set acc = New Access.Application
acc.OpenCurrentDatabase ("J:\Cust_Support.mdb")
acc.DoCmd.OpenReport "test", acViewNormal 'acViewNormal means the report is just printed.
'File dialogue appears here. I want it to save to a path I specify in the code.
acc.CloseCurrentDatabase
Set prt = Nothing
Set acc = Nothing
End Sub
-
Oct 10th, 2005, 12:08 PM
#2
New Member
Re: How to specify path to PDF Writer
Hi, I had the same problem, but solved it, building a macro.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|