Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Jun 2002
    San Antonio, Texas, Uganda
    Thanked 0 Times in 0 Posts

    Splitting text (Word 2000)

    Have a Word form with two text fields. Want to limit the number of characters to 60 in the first text box. Is there a way to enter (for example) 80 characters in the text box and on exit, select the last 20 characters and paste them into the second text field?

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Silicon Valley, USA
    Thanked 94 Times in 90 Posts

    Re: Splitting text (Word 2000)

    We had a similar question last year, how to limit the total length of a field in terms of the number of lines. We adopted the approach that when the person entered another field, an entry macro would check the length of the target field and, if it was overlong, give the user a warning and go back to that field (or just chop it off, I can't remember). The reason for this seemingly roundabout approach was that you can't "go back" from the exit macro for a field, after the macro runs the selection proceeds in the direction started by the user anyway. I have an old file on this; not sure it was the final version. The original poster was Lounger NMP; she might have some advice for you.

    But in your case, since you aren't trying to navigate, you could indeed do the following:

    On your text field, set up an exit macro to look at the length and, if it's too long, chop off the end and copy it to the next box.

    I don't have time to code this up right now, but as you may know, it's a bit tricky manipulating formfields in a protected document. You generally work with the .Result property. Hope this helps.
    Attached Files Attached Files

Posting Permissions

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