Trying to automate data entry in word

P

piersonal

I am trying to assemble a template doc so that when a new document is created
the user types in just the once the customer name and for the document to
then populate the various places that this information is needed. So
bookmarks seemed to be the answer, but once entered, I don't want the user to
be prompted for it again as it does with ask and fillin fields. Hope I am
missing something here!!!

One idea I had was to have a non printing page at the beginning containing a
list of variables such as name, customer, version number, date etc so that
these could be referenced to around the document. Is this possible??? Not a
big VB man, so hoping it doesn't come to that!!!
 
P

piersonal

Thanks for your reply Matt - I have got as far as using bookmarks and indeed
found that the ask and fillin fields work well in general, but they kick off
everytime the fields are refreshed and I wanted a way of only doing it the
first time / when its manually activated - does this make sense??
 
E

Ed

Depending on what you're thinking of with the first time field
activation, you might try something like using one ASK field and
several REF fields. For instance,
{ASK CustName "What name?"}
With that ASK field, you have now created and populated the variable
CustName.
{REF CustName}
will show that variable value.

The first ASK field will still pop up and ask for the value at every
refresh, but that will be the only box to pop up - for that variable,
that is - if you have several variables each having their own ASK
fields, they will all open up on refresh.

If that's too much, then maybe you do need an AutoNew or AutoOpen
macro that will create and populate Custom Document Variables, which
can be referred to in your document using DocVariable fields.

HTH
Ed
 
P

Peter Jamieson

One thing you can consider is to use ASK fields only and put them all at the
beginning, nested inside an IF field:

{ IF firsttime = 1 "{ ASK bookmarka "prompt..." }{ ASK bookmarkb
"prompt..." }etc." }{ SET firsttime 0 }

But before you save the doc, change that final 0 to 1, execute the SET
field, then change the value back to 0

When the user opens the document, they have to know to do ctrl-A then F9.
The ASK fields should execute and all REFs (In the main body of the
document) that refer to their bookmarks should then be updated. firsttime is
set to 0 so the nect time the user does ctrl-A, F9, no ASK fields are
executed.

To re-execute the ASKs the user would either have to know how to modify that
firsttime value again, then do ctrl-A, F9

I've never actually done it that way (I think it's better to use a userform
to set either bookmarks, document variables, or document properties) and it
requires more user knowledge than I'd prefer to rely on, but it doesn't need
any macros and is perhaps worth a try.

Peter Jamieson
 
P

piersonal

excellent Ed thank you - yes I didn't think to use AutoNew - this way I can
run the ask process once at the start for all the different variables needed
and the relevant fields will get populated as a result, without the user
being asked this every time they refresh the fields.

Thanks very much

What do you think though of the idea of a kind of variable table at the
start of the document? Might be good for the user to see a summary of what
the document is about, but not sure how to link this info to the ref fields
in the document ... maybe use the AutoNew trick and do a summary of the
answers at the beginning with a button to rerun the AutoNew process if
required?
 
P

piersonal

Very good idea this, thank you very much Peter. I also like the sound of the
userform you mentioned; is this a VB thing as I have not heard of this ...
but it sounds like it might be exactly what I was after ...
 
P

Peter Jamieson

Yes, it's VBA, userforms look like regular Windows dialog boxes, and you
will find there's quite a bit of effort involved. But if you don't have any
difficulty using macros in your organisation, it's probably the approach
that will give you most control.

Peter Jamieson
 
P

piersonal

Many thanks Peter

Peter Jamieson said:
Yes, it's VBA, userforms look like regular Windows dialog boxes, and you
will find there's quite a bit of effort involved. But if you don't have any
difficulty using macros in your organisation, it's probably the approach
that will give you most control.

Peter Jamieson
 

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