If you are talking form fields, you can't do this. You can have drop-down
fields that people select things from (in a document protected for forms) or
that they type into.

Signature
Charles Kenyon
Word New User FAQ & Web Directory: http://addbalance.com/word
Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide
See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
>I am using Word 2002
> I have a field code (field on the insert drop down) that on click needs
> to select the field (1 or more words) and then if the user starts
> typing the text needs to change color and format.
>
> I am new to field codes so i need lots of help
frogman - 22 Aug 2005 19:12 GMT
I have half of the problem solved.
{MACROBUTTON ClearFormatting ___ Insert number }
this takes the formatting off if the field is clicked.
The user wants the field to be red until the user starts typing.
I have written a macro in Word to do this but when I use the macro if
the field has more than one word it put "" around the text. If I could
get rid of the "" that would be great also.
Cindy M -WordMVP- - 23 Aug 2005 14:57 GMT
Hi Frogman,
> I have half of the problem solved.
> {MACROBUTTON ClearFormatting ___ Insert number }
[quoted text clipped - 6 lines]
> the field has more than one word it put "" around the text. If I could
> get rid of the "" that would be great also.
Show us the macro code you're using...
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 :-)
frogman - 25 Aug 2005 14:41 GMT
I have been fighting with this for awhile.
First problem:
I have fields that are red so the user knows he has to put a value in
that field and if he clicks final and scrolls through the document and
sees red text he has to go back and fix those entries.
First solution:
macrobutton to clear formatting on click.
Second problem:
works great if user types the info but if he decides to click somewhere
else the field text stays black.
Second solution:
This code finds the field index and stores it then changes the text
back to red if the field remains if the file is gone (user typed over
the field) (message box for debug purposes) continue.
The piece I am missing is how to activate the first part of the code to
store the field index then if the user clicks somewhere else and the
field remains to change the field back to red text.
Sub ChangeRedTextBack()
Dim intFieldIndex As Integer
On Error GoTo ErrHandle
intFieldIndex = Selection.Fields.Item(1).Index
If ActiveDocument.Fields.Item(intFieldIndex).Result.Font.Color <>
wdColorRed Then
ActiveDocument.Fields.Item(intFieldIndex).Select
Selection.Font.Color = wdColorRed
End If
ErrHandle:
If Err.Number = 5941 Then
MsgBox "No field selected." & vbCr & "Please select a field.",
vbInformation
End If
Err.Clear
End Sub
Thanks for the help
frogman - 30 Aug 2005 17:25 GMT
Still need help on this one
Greg - 30 Aug 2005 20:53 GMT
Frog,
Try something like:
{ Macrobutton NoMacro {Quote "_____ Insert Number" \* CharFormat}}
Before toggling the field code format the "Q" in "Quote" as red text.
Toggle and update fields. The text "______ Insert Number" should be
red. If a user clicks and types the format will be whatever format was
applied at the field insertion point. If the don't type and go
somewhere else it will stay red.
frogman - 30 Aug 2005 23:18 GMT
That is exactly what I needed
Thank you so very much