lemonhalls
Technical User
Hi,
I have this code that inserts all the files one after another in a folder.
I would like to first arrange the files in the folder into an alphabetical order before proceeding with the insert.
How does one check or make sure the files are alphabetically arranged?
thanks!
_________________
With Application.FileSearch
.NewSearch
.LookIn = activeDir
.SearchSubFolders = False
.FileName = "*.doc"
.MatchTextExactly = False
If .Execute() > 0 Then
For i = 1 To .FoundFiles.Count
Selection.InsertFile FileName:=.FoundFiles(i), Range:="", _
ConfirmConversions:=False, Link:=False, Attachment:=False
End with
I have this code that inserts all the files one after another in a folder.
I would like to first arrange the files in the folder into an alphabetical order before proceeding with the insert.
How does one check or make sure the files are alphabetically arranged?
thanks!
_________________
With Application.FileSearch
.NewSearch
.LookIn = activeDir
.SearchSubFolders = False
.FileName = "*.doc"
.MatchTextExactly = False
If .Execute() > 0 Then
For i = 1 To .FoundFiles.Count
Selection.InsertFile FileName:=.FoundFiles(i), Range:="", _
ConfirmConversions:=False, Link:=False, Attachment:=False
End with