The basic principle is as follows
Code:
Sub FlattenTextBoxes()
Dim shp As Shape, iShp As Integer, sString As String
For iShp = ActiveDocument.Shapes.Count To 1 Step -1
Set shp = ActiveDocument.Shapes(iShp)
If shp.TextFrame.HasText Then
sString = shp.TextFrame.TextRange.Text
shp.Anchor.InsertBefore sString
shp.Delete
End If
Next iShp
End Sub
Your sample file had all the text boxes anchored to the same paragraph and the text is getting put into the doc in reverse order. This single anchor makes it more complicated to get the resulting text in the same order as it appeared on the page. Perhaps this isn't an issue in your Actual documents - the code would likely need to be a lot more complicated to replicate the order of the original text.
I'm not sure if the numbering order uses Z-Order, creation order or physical location on the page.