hi Guessed,
that seems like it would work to copy my tables (no problem with adding in those additional paragraphs)
but it doesn't cover the "look" function that i would like to use, where i find the heading title and then copy the table beneath.
here is an example of the code i was trying to make work (assuming those paragraphs weren't there), note, it doesn't work and the code gets stuck on the first selection criteria.
With Selection.Find
.Text = "Data A"
.Style = "Heading 2a"
.Execute
If .Found Then
End If
End With
With Selection
.MoveDown Unit:=wdLine, Count:=1
.Tables(1).Range.Select
.Copy
.MoveDown Unit:=wdLine, Count:=1
.MoveDown Unit:=wdLine, Count:=1
.TypeParagraph
.MoveUp Unit:=wdLine, Count:=1
.Style = ActiveDocument.Styles("SEW body text")
.TypeParagraph
.PasteAndFormat (wdFormatOriginalFormatting)
End With
|