I have this sub to sequentualy run through the files in the folder:
But in a specific folder I get run time error 5 = Invalid procedure call or argument.
There is ONLY Word documents in the folder - no hidden files !
What is wrong ?
Code:
Sub loopThroughFiles(folder As String)
' Treversing through files in the folder and each
' Hyperlink (if any) is tested for existing FILE or URL
Dim strFile As String
strFile = Dir(folder)
Do While Len(strFile) > 0
loopThroughHyperlinks (folder & strFile)
strFile = Dir()
DoEvents
Loop
End Sub
But in a specific folder I get run time error 5 = Invalid procedure call or argument.
There is ONLY Word documents in the folder - no hidden files !
What is wrong ?