-
OK,
I found this behaviour when the code tries to open a file containing code or with links to other files. Try incorporating the following at "Set oSearchRange" to track down a problem file. I don't get 100% success with this, but it may show a way forward.
[VBA]
On Error Resume Next
Set oSearchRange = docSource.Content
If Err <> 0 Then
MsgBox Err.Description & " - " & f.Name
appWD.Quit False
Exit Sub
End If
[/VBA]
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules