capturing field values

J

JensB

Hi Ng

Here is what I want to do.
User insert by help of the autotext function some blocks of text in a
document, the autotext include some fields where to enter some amount
values.
After the user has filled out all fields, I want to collect these measures
values and save them to an Access database.

But when a has the user has filled out a bookmark or a form textfield, the
field/bookmark disappear, or at list least I can't find
using this code: Selection.GoTo What:=wdGoToBookmark, Name:="Tekst1"

It is not a problem to look up the field, if it has not been used.
Is there a field type or a method that makes it possible to look up these
values?

\JensB
 
D

Doug Robbins - Word MVP

What sort of fields are these. If they are formfields, in which case, the
document should be protected for forms, the formfields would not disappear
when the user enters data into them.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
J

JensB

Thanks Doug

My intention was to create the document "on the fly" by inserting blocks of
text by help of autotext,
in which these formfields are included.
The problem is, if the formfield protection is on, then autotext is
disabled.

Anyway, your hint about protection, gave me an idea, to make a work-around
with these fields.
In "short", I will frame the project with a VS2005 app including a web
browser hosting the Word document.
From a Windows forms checkbox list, the user indicate with an ID which text
blocks he wants.
Then all textblocks are retrieved from an Access database (OLE), and
inserted in the document in one go.
Then the document protection is set to true, and the user can only fill out
the form fields.
After theat I can collect my values from all fields.

I know this might be an overkill, but I am in control with the document.

JensB
 

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