Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word repeats data entry field request with Fill-in Field

Status
Not open for further replies.

searlerm

MIS
Jul 28, 2001
22
0
0
GB
I am using fill-in fields in basic Word documents to allow the user to enter information in a dialogue box when a template is opened, so that Word places the entered text in the correct place. This is to create standard forms.

When I open such documents, Word pops up the field entry boxes twice, and again when I go to print or save the file. Can I stop this?

Thanks

 
If I understand correctly, when you open the document you get a UserForm running tahat you enter data into? Inother words, you have a dialogue box of sorts that when you press OK (or Done or whatever) it closes and put the entries into locations in the document. You are not using formfields in the document itself. Correct?

It almost sounds like you have multiple input boxes, rather than one UserForm.

These also open when you close or print the document? What procedure are you calling this from?

Gerry
 
I am having the same problem. I used
Insert || Field... || MailMerge option FILLIN "Enter Your Name"

When I open the document, it asks me for my name twice, and also again before printing.

I removed the part with the fillin field request and closed and opened it again. No dialog, no problem.

I then recreated (rather than copied) the FILLIN insert field request.

It asks me for the name twice and again before printing.
 
That is how the fillin works.

The only way around that "crap" problem is to use custom made forms and variables, and then use docproperty field to place these on the document.

e.g.
1-create the property on "file->properties->custom", give it a dummy value and a name "var1" (as an example).

2- on the document insert field, docproperty + field name created in 1.

3- With VBA create a form to input the fields that are used on the document, and once the user hits OK fill the corresponding variables.
code
activedocument.CustomDocumentProperties("var1").value = form1.inputfiel1.value
(similar to this!!)


I have used this in add-ins, as a mean of asking the user for information related to the document they are changing, and I also have this as a toolbar button so they can update the document at any time.



Regards

Frederico Fonseca
SysSoft Integrated Ltd
 
Good reference. I absolutely concur with one of the statements there.

Use FormFields to get user input. They are easy to use, very well behaved, and easy to get information out of.

There are some situations that may require FILLIN, but frankly, unless there is serious need for it, FormFields are sooooo much easier.

Gerry
 
Just as a point of reference, you are being prompted again when you print because Word is set to update fields prior to printing (Tools, Options, Print, Update Fields).
 
Hi Folks. Here's another solution, that doesn't rely on a userform or a macro.

1. In your template/document, change each of the FILLIN fields to ASK fields in the following format:
{QUOTE {IF{BkMrk} = "" {ASK BkMrk "Question"} ""}{BkMrk}}
where BkMrk is a bookmark named to match the particular question that was previously asked in your FILLIN field.

2. Then, at the start of each field, create a bookmark (ie Insert|Bookmark) corresponding to whatever you called BkMrk for that field.

3. Save the template/document.

Now, when the document, or a document based on this template is printed, users will only be prompted to update any ASK fields they haven't answered.

This approach has the added advantage of allowing you to replicate the response to a given answer in more than one place, by using REF fields.

Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top