View Single Post
 
Old 06-18-2015, 10:02 PM
gmayor's Avatar
gmayor gmayor is offline Windows 7 64bit Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,137
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

It gets us a little closer, but the document is bizarrely formatted using assorted tables, with different numbers of columns in the rows. Even on a basic level such tables are difficult to handle.

However, as you originally identified, the only thing you can really hang the code on here is the size of the graphics. If we can assume all the graphics to be removed have the same sizes then the following macro may work, but without the document to test against the results may be unpredictable because of the table format:

Code:
Sub DeleteImages()
Dim oShape As InlineShape
Dim oRng As Range
    For Each oShape In ActiveDocument.InlineShapes
        If oShape.Height = 24 And oShape.Width = 24 Then
            Set oRng = oShape.Range
            oRng.Rows(1).Delete
        End If
    Next oShape
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote