I copied a block of code over from an excel macro into a visio macro and I get a "Run-time error '438': Object doesn't support this property or method". The block of code is below:
it failed on the Application.FileSearch
Any ideas?
Thanks in advance.
Code:
With Application.FileSearch
.NewSearch
.LookIn = dir
.SearchSubFolders = False
.filename = "*.xml"
If .Execute > 0 Then
For i = 1 To .FoundFiles.count
Call fileCollection.Add(.FoundFiles(i))
Next i
Set getFileList = fileOperator.selectHighestFileVersions(fileCollection)
Else
'MsgBox "There were no files found."
End If
End With
it failed on the Application.FileSearch
Any ideas?
Thanks in advance.