How to use Lebans to convert to PDF

fluid

Registered User.
Local time
Yesterday, 18:41
Joined
Nov 27, 2008
Messages
81
Can't seem to get a grasp on this.

Here is what I've got so far...

Private Sub topdf_Click()
Dim blret As Boolean
Dim stdocname As String
stdocname = "print and email report"
blret = ConvertReportToPDF(stdocname, vbNullString, "x.pdf", True, True, 150, "", "", 0, 0, 0)
End Sub

When I click on topdf button I get a "Sub or Function not defiined" error.

What I'm I doing wrong?
 
i think I have a post here in the forum a sample on how to convert report to pdf......check it out. search for pdf
 
Can't seem to get a grasp on this.

Here is what I've got so far...

Private Sub topdf_Click()
Dim blret As Boolean
Dim stdocname As String
stdocname = "print and email report"
blret = ConvertReportToPDF(stdocname, vbNullString, "x.pdf", True, True, 150, "", "", 0, 0, 0)
End Sub

When I click on topdf button I get a "Sub or Function not defiined" error.

What I'm I doing wrong?
Maybe I'm stating the obvious but I assume you have created the ConvertReportToPDF function in a module? If so, does the function attempt to run?

At what point does the error appear?

Chris
 
If it is of any help I made my version of Lebans code so that it converts every report in the DB to PDF and sends to a folder. I still have somewhere a little DB where I made it as stand alone.
 
If it is of any help I made my version of Lebans code so that it converts every report in the DB to PDF and sends to a folder. I still have somewhere a little DB where I made it as stand alone.

That may be helpful, if you dig it up and get it to me for an example, I'd really appreciate it.
 
Maybe I'm stating the obvious but I assume you have created the ConvertReportToPDF function in a module? If so, does the function attempt to run?

At what point does the error appear?

Chris


No, I haven't created it...that must be what I'm overlooking. Is there an overview somewhere of what code needs to go where to make this thing work?
 
Make a folder on c: drive called PDFReports.....that is where the Reports that are converted to PDF will land.

As you will see the DB already has Reports.

Open the DB and run Macro1.

If you are running XP it should convert the Reports very quickly. On Vista it will take maybe 10 seconds to do each Report. When you run Macro1 a form will open and then you will see it go down the list. The folder PDFReports should open at the end to show the PDF version of the Reports
 

Attachments

No, I haven't created it...that must be what I'm overlooking. Is there an overview somewhere of what code needs to go where to make this thing work?
If you download Leban's database, you can copy the code to your database.

Two modules:
modDocumentSource
modReportToPDF

A class module:
clsCommonDialog

You also need to copy a couple of DLL files (included in the download) to either the folder where the database is or the System32 folder.

hth
Chris
 

Users who are viewing this thread

Back
Top Bottom