• Select range of cells (Word 2003)

    Author
    Topic
    #424534

    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.

    Viewing 0 reply threads
    Author
    Replies
    • #975342

      Tables with merged cells are a bind 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

      • #975345

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

    Viewing 0 reply threads
    Reply To: Select range of cells (Word 2003)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: