Hi everyone,
First off, I'm fairly new to Access and brand new to this forum, so please be gentle
I'm trying to write a simple little database. At one point on a form, I'm trying to merge all the pdf files in a particular folder.
(I'm using the pdftke.exe program and there will be multiple pdf files)
It all works perfectly if I call it as below, with the actual paths already hard coded. It combines all the pdf files and renames it to the "merged filename.pdf" correctly
Dim stAppName1 As String
stAppName1 = "C:\a folder name\pdftk.exe C:\another folder name\prints\*.pdf cat output C:\folder where merged file will be\merged filename.pdf"
Call Shell(stAppName1, 1)
However, I'm trying to have it work with the middle portion (the folder where all the pdf files are) being created on the fly so to speak.
The middle portion/path I have stored from a previous form and it's stored in a table.
So I'm trying the below, but doesn't seem to work.
Dim stAppName1 As String
Dim combine_files As String
combine_files = (this pulls a path from a stored field on the open form) + "\" + CStr("*.pdf")
stAppName1 = "C:\a folder name\pdftk.exe (combine_files) cat output C:\folder where merged file will be\merged filename.pdf"
Call Shell(stAppName1, 1)
With the code above, it doesn't seem to do anything.
Hopefully I've tried to explain clearly and someone will be able to help.
Thank you
Daryl
First off, I'm fairly new to Access and brand new to this forum, so please be gentle

I'm trying to write a simple little database. At one point on a form, I'm trying to merge all the pdf files in a particular folder.
(I'm using the pdftke.exe program and there will be multiple pdf files)
It all works perfectly if I call it as below, with the actual paths already hard coded. It combines all the pdf files and renames it to the "merged filename.pdf" correctly
Dim stAppName1 As String
stAppName1 = "C:\a folder name\pdftk.exe C:\another folder name\prints\*.pdf cat output C:\folder where merged file will be\merged filename.pdf"
Call Shell(stAppName1, 1)
However, I'm trying to have it work with the middle portion (the folder where all the pdf files are) being created on the fly so to speak.
The middle portion/path I have stored from a previous form and it's stored in a table.
So I'm trying the below, but doesn't seem to work.
Dim stAppName1 As String
Dim combine_files As String
combine_files = (this pulls a path from a stored field on the open form) + "\" + CStr("*.pdf")
stAppName1 = "C:\a folder name\pdftk.exe (combine_files) cat output C:\folder where merged file will be\merged filename.pdf"
Call Shell(stAppName1, 1)
With the code above, it doesn't seem to do anything.
Hopefully I've tried to explain clearly and someone will be able to help.
Thank you
Daryl