text control question

  • Thread starter Thread starter nip
  • Start date Start date
N

nip

Office Word 2007
Is there a way to have the "click here to enter text" not appear when
printed if the field is blank
 
I don't know what your last seven words mean, but you can turn off
"Click and Type" with Office Button > Word Options > Advanced >
Editing Options, about halfway down, uncheck "Enable click and type."
 
The OP is referring to MacroButton NoMacro fields, which often use "Click
here and type name" or the like as the prompt text (see
http://word.mvps.org/FAQs/TblsFldsFms/UsingMacroButton.htm). AFAIK, there is
no way to avoid having the prompt appear if the field hasn't been replaced.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org

I don't know what your last seven words mean, but you can turn off
"Click and Type" with Office Button > Word Options > Advanced >
Editing Options, about halfway down, uncheck "Enable click and type."
 
I don't think they're macrobutton fields. In Word 2007, the new content controls
have "placeholder text" that appears when nothing has been entered (and again if
you delete the entry). The "Click here to enter text" phrase is the default
placeholder text for plain-text and rich-text content controls.

The placeholder text can be manipulated only in macro code. To hide the
placeholder text when printing via Office button > Print, Ctrl+P, or the
immediate-print button that you can add to the Quick Access Toolbar, put these
two macros into Normal.dotm (see http://www.gmayor.com/installing_macro.htm if
needed):

Sub FilePrint()
Dim cc As ContentControl
Dim cnt As Long, i As Long
For Each cc In ActiveDocument.ContentControls
With cc
If .ShowingPlaceholderText Then
.SetPlaceholderText Text:=" "
cnt = cnt + 1
End If
End With
Next

Dialogs(wdDialogFilePrint).Show

For i = 1 To cnt
ActiveDocument.Undo
Next
End Sub

Sub FilePrintDefault()
Dim cc As ContentControl
Dim cnt As Long, i As Long
For Each cc In ActiveDocument.ContentControls
With cc
If .ShowingPlaceholderText Then
.SetPlaceholderText Text:=" "
cnt = cnt + 1
End If
End With
Next

ActiveDocument.PrintOut Background:=False

For i = 1 To cnt
ActiveDocument.Undo
Next
End Sub


--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so all
may benefit.
 
I don't think they're macrobutton fields. In Word 2007, the new content controls
have "placeholder text" that appears when nothing has been entered (and again if
you delete the entry). The "Click here to enter text" phrase is the default
placeholder text for plain-text and rich-text content controls.

The placeholder text can be manipulated only in macro code. To hide the
placeholder text when printing via Office button > Print, Ctrl+P, or the
immediate-print button that you can add to the Quick Access Toolbar, put these
two macros into Normal.dotm (seehttp://www.gmayor.com/installing_macro.htmif
needed):

Sub FilePrint()
    Dim cc As ContentControl
    Dim cnt As Long, i As Long
    For Each cc In ActiveDocument.ContentControls
        With cc
            If .ShowingPlaceholderText Then
                .SetPlaceholderText Text:=" "
                cnt = cnt + 1
            End If
        End With
    Next

    Dialogs(wdDialogFilePrint).Show

    For i = 1 To cnt
        ActiveDocument.Undo
    Next
End Sub

Sub FilePrintDefault()
    Dim cc As ContentControl
    Dim cnt As Long, i As Long
    For Each cc In ActiveDocument.ContentControls
        With cc
            If .ShowingPlaceholderText Then
                .SetPlaceholderText Text:=" "
                cnt = cnt + 1
            End If
        End With
    Next

    ActiveDocument.PrintOut Background:=False

    For i = 1 To cnt
        ActiveDocument.Undo
    Next
End Sub

--
Regards,
Jay Freedman
Microsoft Word MVP        FAQ:http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroupso all
may benefit.






- Show quoted text -

thanks Jay I believe this is what I am looking for. I will give it a
try tomorrow......

Now to take this one step further ...
If I wanted to collect the information that is entered in the control
to an excel spreadsheet do you have a link to a knowledge article on
how to accomplish this?
I am thinking it could be the start of a mini database.
Set up the form in Word with the control to check something as yes or
no or enter text and then have it record the date, and information, to
a spreadsheet. this way you would have one plalce sorted by date
where you can view answers....
is this doable?
 
Nip:  

You may be able to record a macro that adds the hidden attribute to the
Placeholder text character style. But I'm not sure that's what you want. If
you want the spaces to remain but the words gone, change the  font color to
white.

Pam

I find this masking the problem and not a correction. The same effect
is possible by darkening the placeholder color. Thanks anyway but I
think Jay is more on the mark. I will post my results after I test it
out.
 
If I wanted to collect the information that is entered in the control
to an excel spreadsheet do you have a link to a knowledge article on
how to accomplish this?
I am thinking it could be the start of a mini database.
Set up the form in Word with the control to check something as yes or
no or enter text and then have it record the date, and information, to
a spreadsheet. this way you would have one place sorted by date
where you can view answers....
is this doable?

You might find it easier to achieve both your aims if you stick to the
legacy controls, especially if you anticipate others will complete the
forms. To this end http://gregmaxey.mvps.org/Classic Form Controls.htm
will be helpful. Then it is relatively simple to collect information from a
batch of forms. See http://www.gmayor.com/ExtractDataFromForms.htm
and
http://gregmaxey.mvps.org/Extract_Form_Data.htm

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

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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