title: Populate word document from excel without deleting bookmarks
body: <p>I am trying to populate a Word document based on data from Excel. Due to number of specific work requirements, I need to retain the bookmarks in Word. I have used these sites as resources.</p>
  
  <p><a href="https://stackoverflow.com/questions/30017947/replace-text-in-bookmark-in-word-without-deleting-bookmark">Replace Text in Bookmark in Word without Deleting Bookmark</a>
  <a href="http://wordmvp.com/FAQs/MacrosVBA/InsertingTextAtBookmark.htm" rel="nofollow noreferrer">http://wordmvp.com/FAQs/MacrosVBA/InsertingTextAtBookmark.htm</a>
  <a href="http://www.wiseowl.co.uk/blog/s199/word-bookmarks.htm" rel="nofollow noreferrer">http://www.wiseowl.co.uk/blog/s199/word-bookmarks.htm</a></p>
  
  <p>I am getting a compile error in the last line of CopyCell.</p>
  
  <pre><code>Option Explicit
  Dim wd As New Word.Application
  Dim DataCell As Range
  
  Sub ReportData()
  
  'Open word template
  wd.Documents.Open (Range("D4") &amp; Range("D5"))
  wd.Visible = True
  
  'Creates range with all of the data used in the report
  Dim DataRange As Range
  Range("D7").Select
  Set DataRange = Range(ActiveCell, ActiveCell.End(xlDown))
  
  'Uses copycell function. "Name" is the bookmark name, 0 is the Rowoffset
  For Each DataCell In DataRange
    CopyCell "Name", 0
    CopyCell "Employer", 1
  Next
  
  End Sub
  
  Sub CopyCell(BookMarkName As String, RowOffset As Integer)
  
  Dim BMRange As Word.Range
  
  wd.Selection.GoTo What:=wdGoToBookmark, Name:=BookMarkName
  Set BMRange = wd.Selection.Range.Duplicate
  BMRange.Text = DataCell.Offset(RowOffset, 0).Value
  wd.Bookmarks.Add BookMarkName, BMRange
  
  End Sub
  </code></pre>