Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Feb 2001
    Location
    Portland, Maine, USA
    Posts
    296
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Select range of cells (Word 2003)

    I have a series to tables in a document and depending on it use at a particular point in time, I modify the attributes of the data in columns 3 & 4. So I was using this to select each column and then changing font settings: ActiveDocument.Tables(i).Columns(3).Select

    However, now the table has changed and row 1 has been merged across the entire table so this command returns an error. I can seem to figure out how to select column(3).row(2) through column(4),row(x) where x is the last row of the table. I am using Selection.Information(wdMaximumNumberOfRows to get the value for X.

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

    Re: Select range of cells (Word 2003)

    Tables with merged cells are a PITA to work with. It's probably best to loop through individual cells, although that can be slow:

    Dim r As Long
    For r = 2 To x
    ActiveDocument.Tables(i).Cell(r, 3).Range.Font.Bold = True
    Next r

  3. #3
    3 Star Lounger
    Join Date
    Feb 2001
    Location
    Portland, Maine, USA
    Posts
    296
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Select range of cells (Word 2003)

    Thank you! Most the documents are not that big so speed shoudl not be too big of an issue.

Posting Permissions

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