Running a batch
Posted: Fri Nov 23, 2012 9:56 am
OK This is definitely wierd
I change the code to run just one merge
Sub Main
Dim objResult
Set objShell = CreateObject("WScript.Shell")
Dim lp
Dim coad
lp = 2001
coad="c:\windows\system32\pdftk.exe d:\costs\splits\????-??-??_"
coad=coad & lp
coad = coad &"*.pdf cat output d:\costs\record\"
coad = coad & lp
coad = coad & "_costs.pdf"
On Error Resume Next
MsgBox coad
objResult = objShell.Run(coad, 1, True)
End Sub
The msgbox definitely shows that coad is correct
>c:\windows\system32\pdftk.exe d:\costs\splits\??
??-??-??_2001*.pdf cat output d:\costs\record\2001_costs.pdf
When its run nothing happens - no files created at all.
However when I runf from commandline it works.
Gaaaaah!!!!!
I change the code to run just one merge
Sub Main
Dim objResult
Set objShell = CreateObject("WScript.Shell")
Dim lp
Dim coad
lp = 2001
coad="c:\windows\system32\pdftk.exe d:\costs\splits\????-??-??_"
coad=coad & lp
coad = coad &"*.pdf cat output d:\costs\record\"
coad = coad & lp
coad = coad & "_costs.pdf"
On Error Resume Next
MsgBox coad
objResult = objShell.Run(coad, 1, True)
End Sub
The msgbox definitely shows that coad is correct
>c:\windows\system32\pdftk.exe d:\costs\splits\??
??-??-??_2001*.pdf cat output d:\costs\record\2001_costs.pdf
When its run nothing happens - no files created at all.
However when I runf from commandline it works.
Gaaaaah!!!!!