Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Sunrise, Florida
    Posts
    324
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Prevent 'Tab' from adding rows (Word 2K)

    A macro I'm using cycles through the cells of a three-column table and performs an action (adjust pixels) at the end of each middle-column cell. However, since it uses the "Tab" key to do the "cycling", it starts adding unwanted rows at the end of the table. How can I modify the macro so that no rows are added. Below is a portion of the macro. Any help appreciated. Thanks in advance!

    ---------------------
    Do While Selection.Information(wdWithInTable) = True
    ...
    Selection.MoveDown Unit:=wdParagraph, Count:=1
    ...
    If strFullCode = "^013" Then
    Selection.Font.Size = strPixelsToUse
    Selection.MoveRight Unit:=wdCell
    Selection.MoveRight Unit:=wdCell
    Selection.MoveRight Unit:=wdCell
    Selection.HomeKey Unit:=wdLine
    Else
    Selection.MoveRight Unit:=wdCell
    Selection.MoveRight Unit:=wdCell
    Selection.MoveRight Unit:=wdCell
    Selection.HomeKey Unit:=wdLine
    End If
    Loop
    ---------------------

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

    Re: Prevent 'Tab' from adding rows (Word 2K)

    If Selection.Information(wdEndOfRangeRowNumber) = Selection.Information(wdMaximumNumberOfRows) Then
    <font color=448800>' this is the last row of the table</font color=448800>
    Else
    <font color=448800>' it isn't</font color=448800>
    End If

    StuartR

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Sunrise, Florida
    Posts
    324
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Prevent 'Tab' from adding rows (Word 2K)

    Thanks, StuartR! That did the trick! The more I ask the more I know that I know nothing. Take care!

Posting Permissions

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