Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.newusers
RachelT RachelT is offline
external usenet poster
 
Posts: 2
Default Hide placeholder text if nothing is entered

Totally new user to Word as a Form tool - I have created a form with various
fields that may or may not be filled out depending upon the number of
applicants. Can I not print the placeholder text if nothing is entered in
the space?
Thank you!
  #2   Report Post  
Posted to microsoft.public.word.newusers
Jay Freedman Jay Freedman is offline
external usenet poster
 
Posts: 9,854
Default Hide placeholder text if nothing is entered

On Tue, 30 Mar 2010 12:00:01 -0700, RachelT
wrote:

Totally new user to Word as a Form tool - I have created a form with various
fields that may or may not be filled out depending upon the number of
applicants. Can I not print the placeholder text if nothing is entered in
the space?
Thank you!


Add the following macro to the template for the form (see
http://www.gmayor.com/installing_macro.htm if needed). It changes the
color of the placeholder to white, prints, and then restores the
color.

Sub FilePrint()
Dim cc As ContentControl
Dim col As Long

With ActiveDocument

' hide placeholders
For Each cc In .ContentControls
If cc.ShowingPlaceholderText Then
col = cc.Range.Font.Color
cc.Range.Font.Color = wdColorWhite
End If
Next

Dialogs(wdDialogFilePrint).Show

For Each cc In .ContentControls
If cc.ShowingPlaceholderText Then
cc.Range.Font.Color = col
End If
Next

End With
End Sub


--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.
Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I add placeholder text in a document? Melissa Page Layout 4 April 30th 23 08:47 AM
how to make instructional placeholder text disappear debc Microsoft Word Help 1 June 2nd 09 08:52 PM
Text keyed in a placeholder, i.e. footer, disappears. Kate Microsoft Word Help 1 July 11th 08 02:55 PM
insert Placeholder text in MS Word 2000 dimitri Page Layout 1 August 16th 06 02:48 AM
DATABASE field placeholder text spedicini Mailmerge 2 June 7th 05 01:04 PM


All times are GMT +1. The time now is 11:04 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"