Thread: Remove objects
View Single Post
 
Old 12-11-2019, 10:40 AM
Charles Kenyon Charles Kenyon is offline Windows 10 Office 2016
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,140
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Looking at your document with the Selection Pane open, it is a mess! Someone went to a lot of trouble to insert that border. It is made up of multiple grouped shapes.


The following macro will remove all shapes in your document. It gets rid of the line.
Use it on a copy because it may remove things you do not realize are shapes.

Code:
Sub ShapesDelete()
    Dim oShape As Shape
'    MsgBox ActiveDocument.Shapes.Count
    Do Until ActiveDocument.Shapes.Count = 0
        For Each oShape In ActiveDocument.Shapes
            oShape.Delete
        Next oShape
    Loop
End Sub
Instructions for Installing Macros from Forums or Websites by Graham Mayor, MVP
Reply With Quote