You can achieve this by stashing the textbox's in the object array and then iterating through the objects individually.
Sub CommandButton1_Click()
Dim TBs(9) As Object
Set TBs(0) = TextBox1 : Set TBs(1) = TextBox2 : Set TBs(2) = TextBox3
Set TBs(3) = TextBox4 : Set TBs(4) = TextBox5 : Set TBs(5) = TextBox6
Set TBs(6) = TextBox7 : Set TBs(7) = TextBox8 : Set TBs(8) = TextBox9
Set TBs(9) = TextBox10
For i = 0 To 9
With ActiveDocument
If .Bookmarks("href" & i + 1).Range = ".jpg" Then
.Bookmarks("href" & i + 1).Range _
.InsertBefore TBs(i)
.Bookmarks("src" & i + 1).Range _
.InsertBefore TBs(i)
.Bookmarks("alt" & i + 1).Range _
.InsertBefore TBs(i)
End If
End With
Next
UserForm1.Hide
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = ".jpg "
.Replacement.Text = ".jpg"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.HomeKey Unit:=wdLine
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "/ "
.Replacement.Text = "/"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.HomeKey Unit:=wdLine
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = ".jpg.jpg"
.Replacement.Text = ".jpg"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.HomeKey Unit:=wdLine
Selection.Find.Execute Replace:=wdReplaceAll
End Sub