This is a very old code from 2008 and FileSearch was removed from VBA in Word 2007. The following uses an alternative approach, and may do what you want, but try it with only a small number of documents in the folder
Option Explicit
Sub MergeDocuments()
Dim iFile As Integer
Dim sMergePath As String
Dim strFile As String
Dim i As Long
sMergePath = MergeFolder
If sMergePath = vbNullString Then Exit Sub
strFile = Dir$(sMergePath & "*.doc")
While strFile <> ""
MergeDocument sMergePath & strFile
i = i + 1
strFile = Dir$()
Wend
MsgBox ("The code finished merging: " & i & " documents")
End Sub
Sub MergeDocument(sPath As String)
Application.ScreenUpdating = False
ActiveDocument.Merge FileName:=sPath, _
MergeTarget:=wdMergeTargetSelected, DetectFormatChanges:=True, _
UseFormattingFrom:=wdFormattingFromPrompt, AddToRecentFiles:=False
End Sub
Function MergeFolder() As String
MergeFolder = vbNullString
With Application.FileDialog(msoFileDialogFolderPicker)
.Title = "Select the folder of the merge files"
If .Show = -1 Then
MergeFolder = .SelectedItems(1) & Chr(92)
End If
End With
End Function