WORD 2007 Template with VBA

R

RKF

Hi Folks,

I have a template that I use to capture input from users who are requesting
a scan. That template worked fine under 2003 and I was able to get it to run
in 2007. However, when I tried to recreate the functionality starting from
scratch in WORD 2007 I had problems. I have some VBA code that I use to
interrogate an ancillary file which contains a number. I increment that
number by one and place it into the Word document.

Then I used content controls to prompt the user for information. When I
"Open" the .dotm file all of the content controls and legacy check boxes work
fine. But, when I double click on the .dotm file and it opens the second
document to capture data, the sequence number gets generated and posted to
the document but the content controls do not function ...

I can provide the document if that will help...

Can you assist or point to to some person/entity/source that can?

Thanks,

Fergie
 
D

Doug Robbins - Word MVP

Content Controls and Legacy FormField controls do not work well together and
for some reason, Microsoft have not included a Check Box Content Control.

For a work around however, see the following page of Greg Maxey's website:

http://gregmaxey.mvps.org/Custom_CC_Checkboxes.htm

--
Hope this helps,

Doug Robbins - Word MVP

Please reply only to the newsgroups unless you wish to obtain my services on
a paid professional basis.
 
R

RKF

Doug,

This didn't answer my question but it is very useful information and I never
turn down an education!

Thanks much,


Fergie
 
G

Graham Mayor

The issue is that Legacy form fields require the template to be protected
for forms and Word 2007 content controls require the document to be
unprotected. I suspect that your macro protects the form after inserting the
number.

Instead of using 2007 content controls, which are not especially well
implemented in this version of Word, you would be better sticking with
legacy form fields throughout. Legacy form fields work fine in Word 2007 -
whether or not you save in a Word 2007 format.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
R

RKF

Graham,

I may not have mentioned that I have the template working using the legacy
template, id est, a template created in WORD 2K3 and VBA. I was able to port
that over to WORD 2007 and can use it just fine... I was interested in
learning how to do the same things that I do in that template but in WORD
2007.

If I understand what you and Doug are gently hinting at ... I can't get
there from here. What about using CustomCCAddin to produce the checkboxes?
Have you ever tried it or heard of anyone having success with it?

Thanks much,

Ferg
 
D

Doug Robbins - Word MVP

I have not had any reason to use Greg's add-in, but I would see no reason
(other than your Word 2003 form works fine in Word 2007 so if it ain't
broke, don't fix it) for not giving it a try.

--
Hope this helps,

Doug Robbins - Word MVP

Please reply only to the newsgroups unless you wish to obtain my services on
a paid professional basis.
 

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