Accessing bookmarks in Word from Access

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
 
T

Tom van Stiphout

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top