View Single Post
 
Old 05-04-2020, 03:18 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
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

Aside from the '.' after 'd As Document', your code works for me. That said, it's verbose and inefficient. Try:
Code:
Sub Demo()
Application.ScreenUpdating = False
Dim r As Long, Rng As Range
With ActiveDocument.Tables(1)
  For r = 3 To .Rows.Count
    With .Rows(r)
      If .Cells.Count > 1 Then
        Set Rng = .Cells(1).Range
        Rng.End = Rng.End - 1
        .Cells(2).Range.FormattedText = Rng.FormattedText
      End If
    End With
  Next r
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote