View Single Post
 
Old 08-27-2019, 11:02 AM
gmaxey gmaxey is offline Windows 10 Office 2016
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,601
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

The code you posted shows nothing about "omitting" tables.

If you want to remove "Table" captions and those captions stand alone in its parent paragraphs, you can use:


Code:
Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey
Dim oFld As Field
  For Each oFld In ActiveDocument.Fields
    If oFld.Type = wdFieldSequence Then
      'See if it is a Table caption sequence field
      If InStr(oFld.Code, "Table") <> 0 Then
        oFld.Code.Paragraphs(1).Range.Delete
      End If
    End If
  Next oFld
lbl_Exit:
  Exit Sub
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote