Hi fontman,
I agree with Graham that help text is better than default text, but if you
want to continue with default text anyway, you can use macros to clear the
fields when the user prints. You need to intercept the FilePrint command
(for the menu item and Ctrl+P) and the FilePriintDefault command (for the
toolbar button). Each of those macros should call a subroutine that cycles
through the text fields and clears them if they contain the default text.
If the default text for all the form fields starts the same way, for example
"Enter ...", and if this isn't likely to be the start of the user's entry,
then the test can be simple like the one below. If not, you can use a Select
Case statement where the case labels are the names of thetext form fields,
and each case tests for a specific default text.
Public Sub FilePrint()
ClearDefaults
Dialogs(wdDialogFilePrint).Show
End Sub
Public Sub FilePrintDefault()
ClearDefaults
ActiveDocument.PrintOut Background:=False
End Sub
Private Sub ClearDefaults()
' remove default text from
' text form fields before printing
Dim myField As FormField
For Each myField In ActiveDocument.FormFields
With myField
If .Type = wdFieldFormTextInput Then
If Left$(.Result, 6) = "Enter " Then
.TextInput.Default = ""
.TextInput.Clear
End If
End If
End With
Next myField
End Sub
If you want the default text to be returned to the document after printing,
you can use ActiveDocument.Undo. A nice trick for this is to insert a
bookmark in the document before you start clearing fields, print, then run
Undo in a While loop until the bookmark no longer exists.