Forum Discussion
I need to know how to print files from a folder(pdf and jpg) using the same order in my excel list
Hi,
I have a bunch of documents (pdfs and jpgs) in a folder. I need to print these documents in the same order as the list i have in my excel. the most important thing is that the documents printed must be in the same order as the list from my excel (first pdf file and then jpg files). These pdf and jpg files has the same names as per the excel list.
4 Replies
- NikolinoDEPlatinum Contributor
With your permission, add more information, in this case this would be helpful, especially for you
... but also for those who would like to help.
Find out about the Excel version, operating system, storage medium (hard drive, OneDrive, Sharepoint, etc.).
Add one or a few photos and explain step by step which exactly is your plan.
...more Infos: Welcome to your Excel discussion space!
Thank you for your understanding and patience
I know I don't know anything (Socrates)
- alambaig725Copper Contributor
NikolinoDE the documents saved on my folder are renamed to match with the "D" column.
Instead of searching and printing one by one, I need to know if there is a way to print these documents on the same order as the D column list.
- The following code will access each of the files in column D in the order in which they appear in that column. You will need to come up with the code to open, print, and close the various types of file.
Dim i As Long
With Sheets(1).Range("D1")
For i = 1 To .CurrentRegion.Rows.Count - 1
If .Offset(i, 0) <> "" Then
'put code here to open the file, print it and close it
End If
Next i
End With