View Single Post
  #2   Report Post  
Posted to microsoft.public.word.tables
Stefan Blom Stefan Blom is offline
external usenet poster
 
Posts: 8,428
Default Turn off automatic row addition?

Try this macro (posted by Jay Freedman two years ago in the "TAB key appends
new row to table - can this be turned off" thread at
http://groups.google.se/group/micros...b62108f585b/):

Sub TableDemo()
Dim oRg As Range
Dim oCell As Cell


' make sure there is a table
' (prevent an error message)
If ActiveDocument.Tables.Count = 0 Then
MsgBox "No tables!"
Exit Sub
End If


' start at top left
Set oCell = ActiveDocument.Tables(1).Cell(1, 1)


' since we know there is a table, it must have
' at least a Cell(1,1), so this loop will
' execute at least once
Do While Not oCell Is Nothing
' get its range
Set oRg = oCell.Range


' exclude end-of-cell mark from oRg
oRg.MoveEnd unit:=wdCharacter, Count:=-1


' make it bold
oRg.Bold = True


' display it
MsgBox oRg.Text


' go to the next cell
Set oCell = oCell.Next


' if that was the last one and there is
' no next cell, then oCell is now Nothing
' so loop will terminate
Loop
End Sub



--
Stefan Blom
Microsoft Word MVP


"Steven M (remove wax and invalid to reply)"
wrote in message ...
I'm using Word 2000 (it ain't broke), one minor problem. I sometimes
want to turn off the feature that adds a new row, when the cursor is
in the last row of the table and you press Tab. Is it possible?

(It's one of about 15 features that WP5.1 used to have ... )

Thanks,


--
Steven M - lid
(remove wax and invalid to reply)

"It's a damned fool mind that can only think of one way to
spell a word." -- attributed to Dizzy Dean