In a Fillin Field, how do I get "th" or "rd" to be in superscript?

G

Guest

Using Word 2003.
I have a fillin field where users enter the date. How do I get the "th" or
"rd" to format into superscript automatically. ie 24th December or 3rd
December
 
M

macropod

Hi Ann,

This requires some field coding and an ASK field instead of a FILLIN field:
{QUOTE{ASK MyDate "Please input a date"}{MyDate \@ "dddd 'the'
d"}{IF{=(mod({MyDate \@ d},10)<4)*(mod({MyDate \@ d},10)<>0)*({MyDate \@
d}<>11)*({MyDate \@ d}<>12)*({MyDate \@ d}<>13)}= 1 {=mod({MyDate \@
d},10)-2 \# rd;st;nd} th}{MyDate \@ "' of' MMMM, yyyy" }}
where the 'rd', 'st', 'nd' and 'th' are all superscripted.

Eyes glazing over? Actually most of the above can be found pre-coded in my
Date Calc 'tutorial', at:
http://www.wopr.com/cgi-bin/w3t/showthreaded.pl?Number=249902
under the heading 'Insert A Date With Text Using A Form Field' (3rd
example). All you have to do is to insert the ASK field (ie {ASK MyDate
"Please input a date"}, using Ctrl-F9 to create the field braces) and
change the 'DATE' instances in the example to 'MyDate' as per the above.

Cheers
 

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

Top