View Single Post
  #2   Report Post  
Cindy M -WordMVP-
 
Posts: n/a
Default

Hi ?B?Rm9ybS1hbGx5IFN0dW1wZWQh?=,

I have just completed a new form using mainly text form fields and check
boxes. I used the "default text" option in the text form fields to display
instructions to the form users. However, forms will not always be completed
in soft copy. I need to figure out how to show the default text in Word, but
to print the form without having this default text displayed (in other words,
I want the instructions displayed for online filling, but removed when
printing hard copies of the incomplete form).

Does anyone know how to fix this?

Probably a macro that inserts a space into all fields where the field .Result is
the same as the .Default. Here's an example that will run when you click the
Print button in the toolbar.

Sub FilePrintDefault()
Dim ffld As Word.FormField
Dim doc As Word.Document

Set doc = ActiveDocument
For i = 1 To doc.FormFields.Count
Set ffld = doc.FormFields(i)
If ffld.TextInput.Valid Then
If ffld.TextInput.Default = ffld.Result Then
ffld.Result = " "
End If
End If
Next i
doc.PrintOut
End Sub


Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)