Results 1 to 2 of 2
  1. #1
    Star Lounger
    Join Date
    Apr 2002
    Stone Ridge, New York, USA
    Thanked 0 Times in 0 Posts

    Phone Number Formfield Text Format (Word 2000)

    Hi, How would I set a custom text format in a formfield. For instance, set it to (xxx) xxx-xxxx so that anytime 10 numbers were typed into the formfield it would automatically format as above (phone number). Like you can set various Date formats, Time formats, etc. I also need to set one for xxxx-xxxxx-xxxx.


  2. #2
    Super Moderator
    Join Date
    May 2002
    Canberra, Australian Capital Territory, Australia
    Thanked 442 Times in 364 Posts

    Re: Phone Number Formfield Text Format (Word 2000)

    Hi Sherry,

    You could try a field with something like:
    {QUOTE{ASK Phone "What is the 10-digit phone No.? Please enter digits only (eg: 1234567890)."}{Phone # (000)-0000-000}}

    This uses an ASK field to solicit the phone #, then formats the answer as (123) 4567 890 (ie without hyphens).

    If the user tries to enter the number with hyphens, Word interprets them as minus signs and does math on the number when you try to re-format it! The same happens if a 'helpful' user tries to enter a correctly formatted number. You could overcome both issues by using IF to test whether "Phone" was less than (say) 1000000, but even then 'strange' number formats won't be trapped and you'll be stuck with the format entered by the user. The only way I can see to deal with all of these issues is to add a MACROBUTTON field to fire a macro that can do the processing that a Word field can't do on its own.

    Hope this helps

    Paul Edstein
    [MS MVP - Word]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts