Fill-In Fields

M

mg

How do I stop the prompt and/or blank line from being
displayed in a document, if a user presses Cancel when a
fillin field is not filled in because the question does
not apply to that document. I am assuming VBA code. Can
anyone point me in the right direction as to what the
code would be.
 
C

Charles Kenyon

A Fill-In Field does not create a blank line unless there is a default blank
line in the answer box. You have to examine your document structure. You can
examine all field codes in your document by pressing Alt-F9. (Remember to
press Alt-F9 again to conceal them when you are done looking/editing.)

If you can't figure out a field, write again in the mailmerge.fields
newsgroup and someone will help you out. (This isn't a visual basic question
if your prompt is being generated by a Fill-In field.)
--

Charles Kenyon

See the MVP FAQ: <URL: http://www.mvps.org/word/> which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 
M

mg

Hi

OK forgetting about the blank line. If the fill-in field
has a prompt assigned to it, this prompt stays in the
document when the user clicks Cancel. How can the prompt
be automatically removed when Cancel is clicked.

Thanks.
 
C

Charles Kenyon

With a Fill-In field, with field codes not displayed, the prompt does not
show up on screen or in a print out. Are you sure that is what we are
dealing with.

Press Alt-F9 and look at the field. Does it say "FILLIN?" If not, we are
dealing with something else.

A Fill-In field produces a pop-up box (which has a cancel button). It is not
the only way to get such a box.
--

Charles Kenyon

See the MVP FAQ: <URL: http://www.mvps.org/word/> which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 
M

mg

Hi
Field Codes is not turned on under Tools>Options.

This is one of the Fill-in Fields in the document:

{FILLIN "Suburb (if applicalbe or select cancel)" \*
MERGEFORMAT}

If there is no suburb and the user wants to leave it
blank and they press OK or Cancel, the document once all
Fill-In fields are completed, shows Suburb (if
applicable). This is what I am trying to stop appearing.

Look forward to your valuable input.
 
C

Charles Kenyon

Sorry, I just tried it with your field (copied from your message) and tried
both OK and Cancel and clicking on the x to close. Nothing displays or
prints.

Tested in:
Word 2003
Word 2000
Word 97

If, on the other hand, I have a Fill-In field with a default of a blank
line, and run it once pressing OK for the default, I will have a field with
a blank line. Pressing Cancel or OK for that field will give me a blank
line. If I delete the suggested line from the field and press OK, then I do
not have the line. Running the field from that state with field codes being
hidden (no line showing in field but still being the default in the response
box), if I press Cancel or click on the x, I get nothing in the document.
Pressing OK returns my line.

The code for that field is:
{ FILLIN "Suburb (if applicalbe or select cancel)" \d "___________" \*
MERGEFORMAT }
--

Charles Kenyon

See the MVP FAQ: <URL: http://www.mvps.org/word/> which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 
M

mg

If the Fill-In Field is one of three placed vertically in
a document and the second fill in field is cancelled, I
get a blank line in between the first and third line.
Other than going back and deleting this line is there a
way to automatically remove it as soon as Cancel is
pressed.
 
C

Charles Kenyon

Your blank line is there because there is a paragraph mark there. For as
much trouble as it would take to add/remove such a paragraph mark, you could
use a userform. This would gather all of your information at once (instead
of having annoying sequential boxes pop up) and insert it in the proper
location. Look on the UserForm FAQ on the MVP FAQ page for instructions on
how to create a UserForm.
--

Charles Kenyon

See the MVP FAQ: <URL: http://www.mvps.org/word/> which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 
G

Guest

Hi Charles

Thanks for this. I will check out the website - have
been here before and founds lots of amazing stuff.


Regards
 

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