Hi there.
I have recieved help on this problem here before which worked out great:
Treat:
On using the advice form the above tread, I am now trying to slightly change the way the code calls the arguement.
I am using the following code to combine multiply PDF's for my access database.
stDocName = """C:\Program Files\PDF Doc's\Page 1.pdf"" ""C:\Program Files\PDF Doc's\Page 2.pdf"" ""C:\Program Files\PDF Doc's\Result.pdf"""
stAppName = "C:\pdf995\res\utilities\pdfcombine.exe"
Call Shell(stAppName & "" & stDocName, 1)
The results of this combine utility creates one PDF called Results containing all the PDF's in the stDocName, Page1 , page2 etc.
I have enhanced the above code as follows:
--------------------------------------------------------
Dim pag1 As String
Dim pag2 As String
Dim pag3 As String
Dim pag4 As String
pag1 = DLookup("[CombineExtension]", "Temp_Combine_Docs", "[SequenceNo] = 1")
pag2 = DLookup("[CombineExtension]", "Temp_Combine_Docs", "[SequenceNo] = 2")
pag3 = DLookup("[CombineExtension]", "Temp_Combine_Docs", "[SequenceNo] = 3")
rptFinal = "C:\Program Files\PDF Doc's\FinalPage.pdf"
stDocName = """" & [pag1] & """" & " " & """" & [pag2] & """" & " " & """" & [pag3] & """" & " " & """" & rptFinal & """"
Note: the [CombineExtension] has the location of the PDF stored in the field.
-------------------------------------------------------
The above code work great until one of the above documents (e.g. [pag2]) in not in the specified location and the final combines PDF document called rptFinal get corrupted.
Is there any way I can change the above stDocName part of my code to ignore if no document exists in the specified location.
The above code is a small version of the origional code which is set up to combine 20-30 PDF's at once.
Thanks in advance
I have recieved help on this problem here before which worked out great:
Treat:
On using the advice form the above tread, I am now trying to slightly change the way the code calls the arguement.
I am using the following code to combine multiply PDF's for my access database.
stDocName = """C:\Program Files\PDF Doc's\Page 1.pdf"" ""C:\Program Files\PDF Doc's\Page 2.pdf"" ""C:\Program Files\PDF Doc's\Result.pdf"""
stAppName = "C:\pdf995\res\utilities\pdfcombine.exe"
Call Shell(stAppName & "" & stDocName, 1)
The results of this combine utility creates one PDF called Results containing all the PDF's in the stDocName, Page1 , page2 etc.
I have enhanced the above code as follows:
--------------------------------------------------------
Dim pag1 As String
Dim pag2 As String
Dim pag3 As String
Dim pag4 As String
pag1 = DLookup("[CombineExtension]", "Temp_Combine_Docs", "[SequenceNo] = 1")
pag2 = DLookup("[CombineExtension]", "Temp_Combine_Docs", "[SequenceNo] = 2")
pag3 = DLookup("[CombineExtension]", "Temp_Combine_Docs", "[SequenceNo] = 3")
rptFinal = "C:\Program Files\PDF Doc's\FinalPage.pdf"
stDocName = """" & [pag1] & """" & " " & """" & [pag2] & """" & " " & """" & [pag3] & """" & " " & """" & rptFinal & """"
Note: the [CombineExtension] has the location of the PDF stored in the field.
-------------------------------------------------------
The above code work great until one of the above documents (e.g. [pag2]) in not in the specified location and the final combines PDF document called rptFinal get corrupted.
Is there any way I can change the above stDocName part of my code to ignore if no document exists in the specified location.
The above code is a small version of the origional code which is set up to combine 20-30 PDF's at once.
Thanks in advance