hi
I search way to make this code include many diffrent extensions files for printing PDF,JPG,DOCX,..... etc . the current code prints only EXCEL FILES based on COL A(FILE NAME), COL B (COPIES) to print count copies . but I want print any file without exception
Sub printem()
Dim LR As Long, i As Long, x As Long
LR = Cells(Rows.Count, "A").End(xlUp).Row
For i = 2 To LR
x = Cells(i, 2).Value
On Error GoTo NoFile
Workbooks.Open Filename:="C:\Users\PC WORLD\Desktop\ff\" & Cells(i, 1).Value
ActiveWorkbook.Sheets.Select
ActiveWindow.SelectedSheets.PrintOut Copies:=x, Collate:=True
ActiveWorkbook.Close
NoFile:
If Err <> 0 Then
MsgBox "C:\Users\PC WORLD\Desktop\ff\" & Cells(i, 1).Value & " is not in the folder", vbExclamation
Err.Clear
End If
Next i
End Sub