Hi All, I want to delete images inside the header of all sections except section 1 by using VBA code please help. Thanks Nick
Untested, but the following should do what you want: Dim i As Long, j As Long With ActiveDocument For i = 2 To .Sections.Count With .Sections(i).Headers(wdHeaderFooterFirstPage).Range For j = .InlineShapes.Count To 1 Step -1 .InlineShapes(j).Delete Next j End With With .Sections(i).Headers(wdHeaderFooterPrimary).Range For j = .InlineShapes.Count To 1 Step -1 .InlineShapes(j).Delete Next j End With Next i End With -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "Nick" wrote in message news:FC0A7FE2-E1AD-4F4D-80A0-C1E18EC917F0@microsoft.com... > Hi All, > > I want to delete images inside the header of all sections except section 1 > by using VBA code > > please help. > > Thanks > > Nick