View Single Post
 
Old 09-02-2018, 02:34 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
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

The code adds a row to the table, splits that off, merges its cells, then replicates the row at the top of the table, before deleting it and filling the new row at the top of the table with the 'Attachment' text.

It would have been helpful if you had said you only wanted to process two specific tables. You could simply add an If test to the 'With Tbl' block to check what the preceding paragraph contains. For example:
Code:
  With Tbl
    If .Range.Characters.First.Previous.Paragraphs.Last.Range.Text Like "Attachment [3-4]" & vbCr Then
      ...
    End If
  End With
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote