The following function will write any text value (strValue) it is supplied with to a named bookmark (strbmName) in the document (oDoc.) Call it from your search.
Public Sub FillBM(oDoc as document, strbmName As String, strValue As String)
'Graham Mayor - http://www.gmayor.com
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:
Set oRng = Nothing
Exit Sub
End Sub
Basically you open the document, and search for the wanted data then write each piece of that data to the appropriate bookmark in the other document e.g. as follows, which should point the way.
Sub Macro1()
Dim oSource As Document, oTarget As Document
Dim oRng As Range
Dim sText As String
Set oTarget = ActiveDocument 'the document with the table and bookmarks)
Set oSource = BrowseForFile("Select the document to search")
Set oRng = oSource.Range
With oRng.Find
Do While .Execute(findText:="Dealing No:")
oRng.Collapse 0
oRng.End = oRng.Paragraphs(1).Range.End - 1
sText = Split(oRng.Text, "/")(0)
FillBM oTarget, "DealingNo", Trim(sText)
Exit Do
Loop
End With
Set oRng = oSource.Range
With oRng.Find
Do While .Execute(findText:="UNREGISTERED DEALINGS")
oRng.Collapse 0
oRng.End = oRng.Paragraphs(1).Range.End - 1
sText = Split(oRng.Text, "-")(1)
FillBM oTarget, "UnregisteredeDealings", Trim(sText)
Exit Do
Loop
End With
lbl_Exit:
Set oSource = Nothing
Set oTarget = Nothing
Set oRng = Nothing
Exit Sub
End Sub