Two options

  • Thread starter Thread starter rob p
  • Start date Start date
R

rob p

I have a template with one text field that could be two very different
inputs. Either a number (like 2003) in very large bold font or else a date
(XX/XX/XX) in normal (12pt) size. Is there a way to tab into this text field
and do one or the other? Or a better way?
thanks.
 
Hi Rob,
I have a template with one text field that could be two very different
inputs. Either a number (like 2003) in very large bold font or else a date
(XX/XX/XX) in normal (12pt) size. Is there a way to tab into this text field
and do one or the other? Or a better way?
Are we talking about a document protected as a form? With form fields? Version
of Word?

I'd say that in any case you'd need a macro...

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep 30 2003)
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 :-)
 
Hi Rob,

Use the following code on exit from the formfield (in this case Text1)

If Len(ActiveDocument.FormFields("Text1").Result) = 4 Then
ActiveDocument.FormFields("Text1").Range.Font.Size = 20
ActiveDocument.FormFields("Text1").Range.Font.Bold = True
Else
ActiveDocument.FormFields("Text1").Range.Style = "Normal"
End If


--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.
Hope this helps
Doug Robbins - Word MVP
 
Perfect. Thanks Doug,
rob

Doug Robbins - Word MVP - DELETE UPPERCASE CHARACTERS FROM EMAIL ADDRESS
 
Back
Top