cfdh_edmundo
Board Regular
- Joined
- Nov 9, 2005
- Messages
- 133
Hi,
I have a list of files (filepaths and names) in column C of my worksheet. What I would like to do is to run down the column and print each file into a combined master PDF.
Column C contains both excel files and PDFs and additionally there are some blank cells (which should be skipped). For the excel files the page layout and print areas have already been set up correctly.
The column is as follows:
C:\Temp\Test1.xlsm
D:\Reports\Report3.pdf
<blank cell>
C:\Temp\Test2.xlsx
C:\Temp\Test15.xlsx
D:\Reports\Report1.PDF
<blank cell>
D:\Reports\Report22.PDF
I think I need to put everything from column C into an array. I can use a form of the code below to limit column C to the last used cell:
And I can also then use code to remove blank items from the array that's been created.
The major problem I have is figuring out the best way of printing each of the files (which can be Excel files or PDFs) to a single, combined, master PDF.
Any help would be great.
Many thanks,
Chris
I have a list of files (filepaths and names) in column C of my worksheet. What I would like to do is to run down the column and print each file into a combined master PDF.
Column C contains both excel files and PDFs and additionally there are some blank cells (which should be skipped). For the excel files the page layout and print areas have already been set up correctly.
The column is as follows:
C:\Temp\Test1.xlsm
D:\Reports\Report3.pdf
<blank cell>
C:\Temp\Test2.xlsx
C:\Temp\Test15.xlsx
D:\Reports\Report1.PDF
<blank cell>
D:\Reports\Report22.PDF
I think I need to put everything from column C into an array. I can use a form of the code below to limit column C to the last used cell:
Code:
LastRow = .Cells(.Rows.Count, "C").End(xlUp).Row
And I can also then use code to remove blank items from the array that's been created.
The major problem I have is figuring out the best way of printing each of the files (which can be Excel files or PDFs) to a single, combined, master PDF.
Any help would be great.
Many thanks,
Chris