title: Excel VBA - Cross Referencing Bookmark/Form Field to Word
body: <p>I have very minimal knowledge about VBA but still learning as it goes.</p>
  
  <p>I've been using bookmarks in the word in order to populate data from excel. However, due to the content that some data need to repeat in a document, I tried using Text Form Field/Bookmark and REF Field to duplicate the same data.</p>
  
  <p>The problem came in when once I populated data to the word, the text form field/bookmark disappear which causes REF Field unable to track the data that was referred to, hence, the "Error! Reference source not found."</p>
  
  <p>In conclusion, what I'm trying to do is to populate data from excel to a locked word document and at the same time to retain Text Field Form/Bookmark in order to let REF field to track and duplicate the same data.</p>
  
  <p>Is there any way to retain the Text Field Form/Bookmark placeholder after data is populated to the word? Here's my code that I am unable to solve in excel VBA.</p>
  
  <p>Appreciate your help in advance! </p>
  
  <pre><code>Private Sub CommandButton1_Click()
  Dim ws As Worksheet
  Set ws = ThisWorkbook.Sheets("Sheet1")
  Dim objWord As Object
  Set objWord = CreateObject("Word.Application")
  objWord.Visible = True
  objWord.Documents.Open "C:\Users\" &amp; Environ("username") &amp; "\Desktop\XXX\XXX"
  objWord.ActiveDocument.Unprotect Password:="xxx"
  With objWord.ActiveDocument
  
  Dim objBMRange As Range
  Set objBMRange = .Bookmarks("pr1").Range.Text = ws.Range("C28").Value
  objBMRange.Text = pr1
  .Bookmarks.Add "pr1", BMRange
  .Fields.Update
  
  objWord.ActiveDocument.Protect Password:="xxx", NoReset:=False, Type:=wdAllowOnlyFormFields
  End With
  
  Set objWord = Nothing
  End Sub
  </code></pre>