hi arkadi thanks for response.
im do not to too much about programing so pl bare with me
i do not know i found this code and altering for printing pdf file so i do not know but in original code that was there the original code was as follows
Option Explicit
Sub GetFileNames()
Dim xRow As Long
Dim xDirect$, xFname$, InitialFoldr$
InitialFoldr$ = "G:\" '<<< Startup folder to begin searching from
With Application.FileDialog(msoFileDialogFolderPicker)
.InitialFileName = Application.DefaultFilePath & "\"
.Title = "Please select a folder to list Files from"
.InitialFileName = InitialFoldr$
.Show
If .SelectedItems.Count <> 0 Then
xDirect$ = .SelectedItems(1) & "\"
xFname$ = Dir(xDirect$, 7)
Do While xFname$ <> ""
ActiveCell.Offset(xRow) = xFname$
xRow = xRow + 1
xFname$ = Dir
Loop
End If
End With
End Sub
so i just add my old code in loop and i try and error to fix the prob but i stuck
btw code find the 1st file and print in pdf but it do not pass at "Fname = dir" so
can u pl help me thanks again
Bookmarks