Hi Mike,
At the top of your module you have this:
This means that errors are ignored.
Next, you get all your headings (bookmark names) by looping through all the bookmarks in the document - so far so good.
Then, to get the bookmark values you loop using a counter for each bookmark in the document ..
For x = 1 To WordDoc.Bookmarks.Count
:
:
Next
Still good! Now, inside the loop you use the Bookmark counter to reference FormFields - not so good, but becuase you ignore errors you don't see it.
So you need to change the code inside the loop. Although I prefer to avoid them, an error trap is probably the easiest way to handle it in this case:
For x = 1 To Me.Bookmarks.Count
' intRow is the file order number (each file will import on a new row)
' the x is the column - Essentially it'll cycle through all the bookmarks in the Word doc
ActiveSheet.Cells(intRow + intFileNum, x + intCol - 1) = _
WordDoc.FormFields(WordDoc.Bookmarks(x).Name).Result
If Err.Number <> 0 Then
Err.Clear
ActiveSheet.Cells(intRow + intFileNum, x + intCol - 1) = _
WordDoc.Bookmarks(x).Text
End If
Next