Accessing bookmarks in Word from Access

  • Thread starter Thread starter Rose B
  • Start date Start date
R

Rose B

I have developed some code in a 'test' database to go through the bookmarks
in a Word document and process the content. This code compiles/works
successfully. When I copy/paste the code into the application that I want to
use it in, I get a compile error of variable not defined and the word
"FormField" is highlighted in the code below.

I have checked the References used in both databases and they match. Does
anyone have any ideas on what else could be wrong?

For Each FormField In myWordDoc.Bookmarks
 
On Tue, 24 Nov 2009 14:25:02 -0800, Rose B

What is the data type of FormField? How did you declare it? Do you
have Option Explicit on (I sure hope so).

-Tom.
Microsoft Access MVP
 
Back
Top