Changing part of a macros function (Selecting a pdf file from numerous pdf files in a directory)
Posted on 2013-12-01
Below is macro code currently in use:
strFileCopyFrom = ThisWorkbook.Path & "\" & "Template Checklist.pdf"
For Each c In Range(Range("A2"), Range("A" & Cells.Rows.Count).End(xlUp))
strFileCopyTo = ThisWorkbook.Path & "\" & "Template Checklist" & "_" & Format(c, "000") & ".pdf"
FileCopy strFileCopyFrom, strFileCopyTo
The "Template Checklist.pdf" is fine in there is only one document with that name in the folder.
The folder will soon contain numerous PDF files. Is there an easy way to select the needed file and still fulfill the rest of the macro's function?
Thanks for any suggestions.