G
Guest
Hi
My application browses the contents of a network directory and displays any
powerpoint file found in the directory. On completion it returns to the start
and begins again.
The following is a snippet of the code that is used to get the name of the
file before it is displayed.
Dim fs, f, fc, f1
Dim PresentationName as String
fs = CreateObject("Scripting.FileSystemObject")
f = fs.GetFolder(***********)
fc = f.files
f1 = Nothing
For Each f1 in fc
PresentationName = f1.Name
'lots of other code follows
Next
For several reasons, which I won't go into here, I also need to know the
name of the next file in the directory as well as the name of the current one
at the same time ..... so my code needs to be changed as follows
For Each f1 in fc
PresentationName = f1.Name
' some code to get the name of the next file (i.e. the
next f1)
'lots of other code follows
Next
Can anybody help with the line where I need "some code to get the name of
the next file"
Would appreciate any pointers
Regards
Michael Bond
My application browses the contents of a network directory and displays any
powerpoint file found in the directory. On completion it returns to the start
and begins again.
The following is a snippet of the code that is used to get the name of the
file before it is displayed.
Dim fs, f, fc, f1
Dim PresentationName as String
fs = CreateObject("Scripting.FileSystemObject")
f = fs.GetFolder(***********)
fc = f.files
f1 = Nothing
For Each f1 in fc
PresentationName = f1.Name
'lots of other code follows
Next
For several reasons, which I won't go into here, I also need to know the
name of the next file in the directory as well as the name of the current one
at the same time ..... so my code needs to be changed as follows
For Each f1 in fc
PresentationName = f1.Name
' some code to get the name of the next file (i.e. the
next f1)
'lots of other code follows
Next
Can anybody help with the line where I need "some code to get the name of
the next file"
Would appreciate any pointers
Regards
Michael Bond