If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Printing PDF Files in Order
I have a table with links on it to PDF files. I would like to print
the files in the order that they appear in the table. When I run the code to print out the files, they seem to come out of the printer in a random order. Below is a snipet of my code. Does anybody have any suggestions? Do Until myRecordset.EOF tempname = myRecordset.Fields(1).Value If tempname "" Then tempname2 = Replace(tempname, "#", "") If fso.FileExists(tempname2) Then ADOBEPATH = "C:\Program Files\Adobe\Reader 8.0\Reader\AcroRd32.exe" PDFFILE = tempname2 Shell """" & ADOBEPATH & """/p /h """ & PDFFILE & """" End If End If myRecordset.MoveNext Loop |
#2
|
|||
|
|||
Printing PDF Files in Order
If your recordset is based on the table, there will be no defined order to
it (it will probably be sorted by the primary key field, and the records should appear in the same order each time). If you need it sorted by a specific field, build a query which does so, and open the recordset based on that query. HTH, Rob .. Jonas wrote: I have a table with links on it to PDF files. I would like to print the files in the order that they appear in the table. When I run the code to print out the files, they seem to come out of the printer in a random order. Below is a snipet of my code. Does anybody have any suggestions? Do Until myRecordset.EOF tempname = myRecordset.Fields(1).Value If tempname "" Then tempname2 = Replace(tempname, "#", "") If fso.FileExists(tempname2) Then ADOBEPATH = "C:\Program Files\Adobe\Reader 8.0\Reader\AcroRd32.exe" PDFFILE = tempname2 Shell """" & ADOBEPATH & """/p /h """ & PDFFILE & """" End If End If myRecordset.MoveNext Loop |
#3
|
|||
|
|||
Printing PDF Files in Order
On Apr 9, 4:52*pm, "Rob Parker"
wrote: If your recordset is based on the table, there will be no defined order to it (it will probably be sorted by the primary key field, and the records should appear in the same order each time). *If you need it sorted by a specific field, build a query which does so, and open the recordset based on that query. HTH, Rob . Jonas wrote: I have a table with links on it to PDF files. *I would like to print the files in the order that they appear in the table. *When I run the code to print out the files, they seem to come out of the printer in a random order. *Below is a snipet of my code. *Does anybody have any suggestions? Do Until myRecordset.EOF tempname = myRecordset.Fields(1).Value If tempname "" Then tempname2 = Replace(tempname, "#", "") If fso.FileExists(tempname2) Then ADOBEPATH = "C:\Program Files\Adobe\Reader 8.0\Reader\AcroRd32.exe" PDFFILE = tempname2 Shell """" & ADOBEPATH & """/p /h """ & PDFFILE & """" End If End If myRecordset.MoveNext Loop- Hide quoted text - - Show quoted text - Everything was in order. I created a do until loop to delay the processing eight seconds which seems to be enough time for the PDF file to be sent to the printer. It works now. |
Thread Tools | |
Display Modes | |
|
|