Word Document 1 is a word document containing a number of tables which can be populated by a Userform. Where a row in a table is not required then the Userform removes it when the user does not tick the associated checkbox in the Userform.

I now want to take the finalised inputted information in Word Document 1 and input it into bookmarked sections of Word Document 2. I have done this by using the the code at the bottom of my post (which I found elsewhere online and is not ideal).

My issue is that I never know which rows in Word Document 1 will be deleted by the user so the code below does not meet my needs as it refers to fixed table cell references. I.e. it can deal with the scenario that the text in row 1 col 1 goes into bookmark 1, row 2 col 2 goes into bookmark 2, row 3 col 3 goes into bookmark 3 - However, the user may via the Userform delete row 2, so now what was row 3 becomes row 2 and the wrong text will be entered into the Word Document 2 bookmark.

I think that because the Userform populates the table by putting the text from the textboxes into bookmarks in the cells in the table, the bookmarks remain after the Userform has been used - so i thought it could be possible to do the following -

Search in word document 1 for 'bookmark a'
If it finds 'bookmark a' then copy the text in the same cell and paste it into the Word Document 2 at 'bookmark 1'
If it does not find a book mark called 'bookmark a' (because the row has been deleted) then move on to look for the next bookmark

This would repeat for all of the possible bookmarks in Word Document 1.

Any ideas?

[VBA]
Option Explicit

Sub CopyData()
Dim oSource As Document
Dim oTarget As Document
Dim oTable As Table
Dim oCell As Range
Set oSource = ActiveDocument
'Set oTarget = Documents.Add("C:\Path\Templatename.dotx")
Set oTarget = Documents.Open("C:\Users\herriale\Desktop\New folder\Phase 2\Template (MY.G.PBR) 31.3.15.docx")
Set oTable = oSource.Tables(1)
Set oCell = oTable.Cell(1, 2).Range
oCell.End = oCell.End - 1 'eliminate the end of cell marker
FillBM oTarget, "PlayerName", oCell.Text
'Repeat as required with the appropriate values
lbl_Exit:
Exit Sub
End Sub

Private Sub FillBM(oDoc As Document, _
strBMName As String, _
strValue As String)
Dim oRng As Range
With oDoc
On Error GoTo lbl_Exit
Set oRng = .Bookmarks(strBMName).Range
oRng.Text = strValue
oRng.Bookmarks.Add strBMName
End With
lbl_Exit:
Exit Sub
End Sub
[/VBA]