This is not particularly clean code but it appears that there are far better ways to achieve what you are trying to do. Using selection while jumping across multiple documents is a very bad idea if you want to know where you are.
Your code implies that within each <html> element is only one number string and one <title> element. If that is the case then there is no reason to bother with the html elements at all since the pairs of title/number probably match.
Perhaps if you post a sample document we can provide better code to achieve your aims. For instance, the initial loop to find the <html> is better done with ranges along these lines
Code:
Dim aRng As Range, aDoc As Document, aDoc2 As Document
Set aDoc = ActiveDocument
Set aRng = aDoc.Range
With aRng.Find
.ClearFormatting
.Text = "\<\!doctype html\>*\</html\>"
.Forward = True
.Wrap = wdFindStop
.MatchCase = False
.MatchWildcards = True
Do While .Execute = True
Set aDoc2 = Documents.Add
aDoc2.Range.FormattedText = aRng.FormattedText
'do your inner processing of the <html> element here
aRng.Collapse Direction:=wdCollapseEnd
Loop
End With
But I'm not really convinced that there needs to be three documents at all. You should only need the initial document and let the code create an output document for the data you want to gather.