Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Sep 2002
    Location
    Exton, Pennsylvania, USA
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    stop tab from creating rows (2000)

    Does anyone know a way to prevent the TAB key from creating a row in a table?

    This is my problem. I want to create a form with form fields in a table for users to complete and I also wanted them to have certain rows for text entry to do bullets or numbering. This isn't a problem except I also wants the TAB key to take a person to next area for typing and not create new rows.

    Any suggestions?

  2. #2
    5 Star Lounger
    Join Date
    Jul 2002
    Location
    Toronto, Ontario, Canada
    Posts
    1,139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: stop tab from creating rows (2000)

    If you are using FormFields in your table, then all you need to do is protect your form (Tools|Protect Document..., Select Forms Option Button) and then the tab will not create a new row, but will take you to the next FormField.
    --
    Bryan Carbonnell - Toronto <img src=/S/flags/Ontario.gif border=0 alt=Ontario width=30 height=18> <img src=/S/flags/Canada.gif border=0 alt=Canada width=30 height=18>
    Unfortunately common sense isn't so common!!
    Visit my website for useful Word, Excel and Access code, templates and Add-Ins

  3. #3
    New Lounger
    Join Date
    Sep 2002
    Location
    Exton, Pennsylvania, USA
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: stop tab from creating rows (2000)

    Right, but I want to have some rows of the table open for general text entry/formatting. If I protect form, my users can't do that. I can break the document into protected sections and unprotected sections. But how can I make the TAB key in the unprotected sections take them to the next area?

  4. #4
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: stop tab from creating rows (2000)

    Using <!profile=Klaus Linke>Klaus Linke<!/profile>'s code from <post#=114359>post 114359</post#> we could create a pair of Macros like.

    Public Sub TabToNextFormField()
    Selection.GoTo What:=wdGoToField, Which:=wdGoToNext
    End Sub

    Sub SetKeyBindings()
    CustomizationContext = NormalTemplate
    KeyBindings.Add KeyCategory:=wdKeyCategoryMacro, _
    Command:="TabToNextFormField", _
    KeyCode:=wdKeyTab
    End Sub

    Execute SetKeyBindings once to assign the Macro to the Tab key
    You may need to change the NormalTemplate in the second one to point to somewhere different (e.g. ActiveDocument.Template)
    You could modify the TabToFormField macro so that it changes its behaviour depending on whether the selection is in a table.

    StuartR

Posting Permissions

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