Hi ArnelGP
Thanks again for taking your time with me...
Its really curious what is happening here
So, if i use it like this it creates the pdf file from jpgs and then deletes all the files including the resulting pdf file:
'delete the initial files
For i = 0 To dictFiles.Count - 1
Kill dictFiles.Keys()(i)
Next
If i replace -1 with -2 it keeps the resulting pdf file (output.pdf ) and keeps 1 jpg file ( the last jpg file ).
For example if i have 1.jgp, 2.jpg, 3.jpg, 4.jpg it creates the file Output.pdf and keeps 4.jpg ( the last jpg file ).
'delete the initial files
For i = 0 To dictFiles.Count - 2
Kill dictFiles.Keys()(i)
Next