Results 1 to 2 of 2
  1. #1
    Star Lounger
    Join Date
    Aug 2001
    Posts
    56
    Thanks
    0
    Thanked 0 Times in 0 Posts

    No ENTER on Form (2003)

    I have a one-page form that uses text fields and check boxes. When using the form, I do not want the ENTER key to create a new line any where on the document. The form must maintain its current spacing, etc. I'm assuming that code may accomplish this but I am not familiar with how to do this. Where is this code typed? Help???

    Nancy

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: No ENTER on Form (2003)

    MSKB article How to code the ENTER key to move between form fields in a protected form in Word explains how to do this. All code would go into a standard module (the kind you create by selecting Insert | Module in the Visual Basic Editor). The article assumes that you're creating a template and that the users will create a new document based on this template.
    I have attached a zip file with a template that demonstrates it.
    Warning: this kind of code is rather fragile. One side effect is that you must explicitly save the template after editing it, but before you close it, for you won't be prompted whether you want to save changes (This does not apply to documents based on the template, they will prompt as usual).
    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
  •