Last edited by ZVI; 07-10-2014 at 04:22 PM.
Thanks ZVI. I see that the file does have password protection in it even though it does not ask for any when I open it. I tried it with some PDFs I created and the macro worked perfectly.
My next steps will be to only merge similar PDF files (files beginning with same filenames) out of the bunch of PDF file in the folder and then renaming the merged file to a corresponding name on a list. Any tips of the best way to do that?
Last edited by yuechu; 07-11-2014 at 05:44 AM.
Name of the destination file is defined in the constant DestFile of the subroutine Main(), change it as required.
Or pass file name you like into the sub MergePDFs() using the 3-rd parameter.
To merge some files in a folder by filename mask replace this f = Dir(MyPath & "*.pdf")
for example by that one f = Dir(MyPath & "MyFileMask*.pdf")