Q:

Mass Find and Replace - Microsoft Word 2013

I am trying to create a macro in order to do a mass find and replace across multiple word documents. I have found this one on the net and altered it however I keep getting a run time error (5174) saying that the file could not be found (even though it is definitely in the folder). 
Also after I have found a solution to the initial issue I need to be able to Find and replace pictures which are in a footer. 
Sub ReplaceText()
  Dim Directory As String
  Dim FType As String
  Dim FName As String

Directory = "C:\Users\pieria\Desktop\TempPics"
FType = "*.docx"

ChDir Directory
FName = Dir(FType)
' for each file you find, run this loop
Do While FName <> ""
    ' open the file
    Documents.Open FileName:=FName  '<--Error is supposedly here 

    ' search and replace the company name
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = "CompanyA"
        .MatchCase = True
        .Replacement.Text = "CompanyB"
    End With
    Selection.Find.Execute Replace:=wdReplaceAll

    ' save and close the current document
    ActiveDocument.Close wdSaveChanges

    ' look for next matching file
    FName = Dir
Loop 
End Sub

A:

Works fine for me.  My guess is that you've got a broken input file and/or wonky file name.  
Time to start debugging:
In the VBA editor, set a breakpoint on the Documents.Open FileName:=FName line, and add a Watch to Fname.
Run the code and each time it stops, note the file name it's working on (shown in the "Watches" pane).  Now, when it throws the error out, you'll know which file it is having problems with.  
Check that file for corruption, permission problems, and/or general oddness. :)

