Hi Guys,
We are migrating to 2010 shortly followed by I365 from office 2003.
I am having a few issues with the following code and Application.filesearch does not exsist.
This code looks for a file name, then copys it into a specified folder.
There are 15 files this happens to.
The date/time must be sorted by last modified.
Any ideas?
Thanks
Jon
We are migrating to 2010 shortly followed by I365 from office 2003.
I am having a few issues with the following code and Application.filesearch does not exsist.
Code:
Sub Outsource_Import()
With Application.FileSearch
.NewSearch
.LookIn = "U:\Source\"
.FileName = "Daily_Weekly_Performance_Report_0000000*"
If .Execute(SortBy:=msoSortByLastModified, SortOrder:=msoSortOrderDescending) > 0 Then
FileCopy .FoundFiles(1), "X:\Customer Services\Pre_01.txt"
End If
This code looks for a file name, then copys it into a specified folder.
There are 15 files this happens to.
The date/time must be sorted by last modified.
Any ideas?
Thanks
Jon