You don't say what error you're getting, but I'll guess that Access VBA
is not recognising the Word constants wdFieldFormCheckbox and
wdFieldNumPages.
You need to either
-go to Tools|References in the VB Editor and add a reference to
Microsoft Word 11.0 Object Library,
or
-replace the constants with their literal values (e.g.
wdFieldFormCheckBox = 71).
I'd do the first; this means you'll also be able to declare
Dim oApp As Word.Application
(this is called 'early binding') and get the Intellisense features of
the VBE working on the Word objects as well as the Access ones.
>Hi,
>
[quoted text clipped - 24 lines]
>
>Thank you
--
John Nurick [Microsoft Access MVP]
Please respond in the newgroup and not by email.
greeknl - 13 Jan 2007 17:44 GMT
THANKS
I already had done step 1.
I replaced the wd... statement with the value 71 and voila there it was.
I have been trying to find the list with those constants. Can you help me on
this? Is there a list of all wd.... values available?
I suppose this also works with the numpages field I want to put in the
document?
You have been a real help.
Also this forum is one of the best I found on the net.
Thanks again
Douglas J. Steele - 13 Jan 2007 20:25 GMT
Best way I know of is to go into the VB Editor in Word, and determine the
values in the Immediate window.
You can also go through the Object Browser while in Word (or from Access if
you have a reference set to Word).

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)
> Is there a list of all wd.... values available?
greeknl - 13 Jan 2007 20:34 GMT
Me again
after a bit of intense searching I found the link for these constants
http://msdn2.microsoft.com/en-us/library/aa211923(office.11).aspx#
and john, thanks again