Without access to the document it is difficult to test, but all seems to revolve around
Code:
yy = ActiveDocument.Tables.Count
i.e. the last table in the document. If you want process a different table e.g. the first table in the document, you need to address that table here. e.g.
Code:
yy = ActiveDocument.Tables(1)
What the effect of the bookmarks in the document might be I cannot say.