title: Word VBA - How to iterate through characters in a Table Cell
body: <p>I'm trying to iterate all characters in a table cell but the performance is incredibly slow. Maybe because using Characters is expensive.</p>
  
  <pre><code>   For Each oRow In t.Rows
  
        ' Loop through each cell in the current row.
        For Each oCell In oRow.Cells
  
           ' If there is no background color in the cell, not worth to check
           If oCell.Shading.BackgroundPatternColorIndex = wdAuto Or oCell.Shading.BackgroundPatternColorIndex = wdWhite Then
  
  
              For i = 1 To oCell.Range.Characters.Count
                  If oCell.Range.Characters(i).HighlightColorIndex = wdAuto Then
                      oCell.Range.Characters(i).HighlightColorIndex = wdPink
                  End If
              Next
  
           End If
  
        Next oCell
  
     Next oRow
  </code></pre>
  
  <p>Is there a more effective way to iterate the Cell Range ?</p>