I try the following, but when sorting on LastModified it=20
always sorts ascending on filename. This is what i try:

With Application.FileSearch
.NewSearch
.LookIn =3D testpath
.SearchSubFolders =3D True
.FileName =3D *.doc"
.MatchTextExactly =3D True
.FileType =3D msoFileTypeAllFiles
.LastModified =3D msoLastModifiedAnyTime
End With

With Application.FileSearch

If .Execute(SortBy:=3DmsoSortByLastModified, _
SortOrder:=3DmsoSortOrderDescending) <> 0 Then
.
.
.
Exactly the same reults when using Ascending
/Bj=F6rn

Re: How to make a filesearch sorted on last modified files by Word

Word
Fri Sep 19 09:10:40 CDT 2003

G'day "Björn" <bjorn.kallander@se.ibm.com>,

preload all the valid results into an array and wodbasic.sortarray the
sucker yourself

"Björn" <bjorn.kallander@se.ibm.com> was spinning this yarn:

>I try the following, but when sorting on LastModified it
>always sorts ascending on filename. This is what i try:
>
>With Application.FileSearch
> .NewSearch
> .LookIn = testpath
> .SearchSubFolders = True
> .FileName = *.doc"
> .MatchTextExactly = True
> .FileType = msoFileTypeAllFiles
> .LastModified = msoLastModifiedAnyTime
>End With
>
>With Application.FileSearch
>
> If .Execute(SortBy:=msoSortByLastModified, _
> SortOrder:=msoSortOrderDescending) <> 0 Then
>.
>.
>.
>Exactly the same reults when using Ascending
>/Björn

Steve Hudson

Word Heretic, Sydney, Australia
Tricky stuff with Word or words for you.
Email steve@wordheretic.com
Products http://www.geocities.com/word_heretic/products.html

Replies offlist may require payment.