View Single Post
 
Old 04-01-2021, 02:42 PM
macropod's Avatar
macropod macropod is offline Windows 10 Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by mbcohn View Post
The number of tables in the document varies, but the changes that I want to make are always to the first table. always to the second column, and the table itself is never more than about five rows tall.
In which case:
Code:
Dim r As Long
  With wdDoc.Tables(1)
    For r = 1 To .Rows.Count
      Select Case Trim(Split(.Cell(r, 1).Range.Text, vbCr)(0))
        Case "Revision No.": .Cell(r, 2).Range.Text = "2.5"
        Case "Published": .Cell(r, 2).Range.Text = "2 April 2021"
      End Select
    Next
  End With
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote