There is nothing in the code to prevent it from running on multiple files. If it's only processing one, that suggests you have one or more files with some form of protection, or perhaps a mailmerge connection, in the same folder. The code isn't written to cope with such files.
You've evidently also added some code of your own without taking time to understand how it can be properly integrated with the code you found here. Try:
Code:
Sub UpdateDocuments()
Application.ScreenUpdating = False
Dim strFolder As String, strFile As String, wdDoc As Document, i As Long
strFolder = GetFolder
If strFolder = "" Then Exit Sub
strFile = Dir(strFolder & "\*.docx", vbNormal)
While strFile <> ""
Set wdDoc = Documents.Open(FileName:=strFolder & "\" & strFile, AddToRecentFiles:=False, Visible:=False)
With wdDoc
'Highlight all misspelled words.
For i = 1 To .SpellingErrors.Count
With .SpellingErrors(i).Font
.Color = wdColorRed
.Bold = True
End With
Next
.Close SaveChanges:=True
End With
strFile = Dir()
Wend
Set wdDoc = Nothing
Application.ScreenUpdating = True
End Sub
Function GetFolder() As String
Dim oFolder As Object
GetFolder = ""
Set oFolder = CreateObject("Shell.Application").BrowseForFolder(0, "Choose a folder", 0)
If (Not oFolder Is Nothing) Then GetFolder = oFolder.Items.Item.Path
Set oFolder = Nothing
End Function
PS: When posting code, please use the code tags. They're on the 'Go Advanced' tab at the bottom of this screen.