Printing UNUSED fields in forms

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have created a form in MSWord using the Forms Toolbox. There are a few
fields I do not want to print if the user does not fill it in. For example,
if the field text says "What is your mother's name", and the user skips this
field, I do not want the field text to print. I want the field to be blank.
How can this be accomplished? I have searched all over to figure this out.
Please help. Thank you!
 
Are you saying that you have "What is your mother's name" in the field as a
default text?
In that case, run the following macro on exit from the field to clear the
text (here field Text1) if the user tabs over the field.

Sub ClearField1()
Dim sText As String
sText = ActiveDocument.FormFields("Text1").Result
If sText = "What is your mother's name?" Then
ActiveDocument.FormFields("Text1").Result = ""
End If
End Sub

http://www.gmayor.com/installing_macro.htm

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

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
Ah, yes......default text is what I meant :) I am glad you understood what I
was saying. It sounds like your solution just might work. I will give it a
try.
Thank you!
 

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

Back
Top