Combining files within a folder into pdf

mttcttrll

New Member
Joined
Feb 27, 2017
Messages
11
Hello,

I am a VBA novice so bear with me, please.

Every month, I run about 20 report packets, made of of a variable number of pdf's. Sometimes I need to re-run etc, some months I'll lose a packet or gain one depending on my assignment. Lets say the files for each packet are 1.pdf, 2.pdf, etc and stored in there own folder. But again, it can be variable total number. I'm trying desperately to add automation to my workflow. I have variable-driven server paths in one of my sheets, Data!C2, Data!C3 etc, where each cell represents a different output pdf set (so there are 4 pdf files in the path folder in C2, 5 in the pdf file in C3).

The format is basically: //server/folder1/folder2/folder3/formula1/formula2/formula3

That part was just some basic formulas.

I'm trying to basically run the following formula, which I definitely need to run in vba and am pretty lost:

if
C3<>0
open PDFSam in shell and merge all the files output to //server/folder1/folder2/folder3/
else
repeat but for C4 instead of C3, scan through row 100 for <>0 in case one of the cells has a false-status (not running a report that month, or not ready yet)

Similar to this thread, for reference, which is what made me think this would be the best way to approach the situation.

Thank you for your insight! Here is a screenshot of the sheet with the paths on it: Imgur: The most awesome images on the Internet
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
I'm not sold on using PDFSam, I'm just looking for something free. My goal is to make this in such a way that if I'm no longer at my current firm the next person can just take it over with relative ease. It looked like the console-files for PDFSam could just be put in a sub-folder off of My Documents so I could put a note that simply says: 'Download this file and put it at this path on local'
 
Upvote 0

Forum statistics

Threads
1,214,523
Messages
6,120,028
Members
448,940
Latest member
mdusw

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top