View Single Post
 
Old 02-16-2014, 04:34 PM
macropod's Avatar
macropod macropod is online now Windows 7 32bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,382
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

Hi Carol,

Try:
Code:
Sub Demo()
Dim DocSrc As Document, DocTgt As Document, Tbl As Table, TblRw As Row
Set DocSrc = ThisDocument
Set DocTgt = ActiveDocument
With DocSrc
  For Each Tbl In .Tables
    For Each TblRw In Tbl.Columns(3).Cells
      With TblRw.Range
        If InStr(.Text, "Draft") > 0 Then
          .Rows(1).Range.Copy
          DocTgt.Range.Characters.Last.Paste
        End If
      End With
    Next
  Next
End With
Set DocSrc = Nothing: Set DocTgt = Nothing
End Sub
Note: As coded, the source and target documents are specified as 'ThisDocument' and 'ActiveDocument', respectively. You'll need to make the appropriate modifications to the code if that's not the case.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote