I don't know Word VBA at all so whatever I suggest will mean you need to do your own research on it. You've got some learning to do, ![]()
That said, I think I can give you some pointers.
1] It looks like you used CTRL F5 to call up Edit > Find. What about using the Replace and Replace All features of Find? (Sorry, I don't have Word 2007 so I can't be sure if the Find menu is the same as in older versions).
2] If that doesn't work, then you will need to delve into the VBA code itself and insert some sort of For/Next loop to work down the document. You may need an error trap within the For/Next loop to be able to exit the loop when no further image cells are found.
It's an interesting project and I wish you luck.
Hopefully others here with Word 2007 VBA knowledge will be able to give you more specific guidance.
Mark
Windows 7 Home Premium
Office 2007 Enterprise SP2
VBA 6.5
In a Word 2007 document (attached) that includes tables with pictures in some of their cells, I've recorded a macro that goes to the next picture, deletes it, and fills its cell with grey shade (see delailed steps recorded hereinafter).
I'd like to modify the code produced (see hereinafter) in such a way, that it will repeat that routine as long as there still exist pictures in the document. Once there are no more pictures, it will go to the beginning of the document (Ctrl-Home) and stop.
Could you please suggest the additional code lines to be inserted in order to achieve it?
Steps recorded in the macro:
(before recording started, the cursor was at the beginning of the document)
Start recording and name the macro (say, XWd_Cells)
? Click F5 key
? In the Go To tab, under Go to what select Graphic
? Click Next and then click Close
? Click Delete key twice.
? In the Ribbon, under Layout, select Properties
? In the Table tab click Borders and Shading?
? In the Shading tab -
o Under Fill select a shade, say, dark grey (at bottom of leftmost shades column)
o Under Apply to select Cell
o Click OK
? Click OK
Stop macro recording
Code Produced
Sub XWd_Cells()
'
' XWd_Cells Macro
'
'
Selection.GoTo What:=wdGoToGraphic, Which:=wdGoToNext, Count:=1, Name:=""
Selection.Find.ClearFormatting
With Selection.Find
.Text = ""
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchKashida = False
.MatchDiacritics = False
.MatchAlefHamza = False
.MatchControl = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Delete Unit:=wdCharacter, Count:=1
Selection.Delete Unit:=wdCharacter, Count:=1
With Selection.Cells.Shading
.Texture = wdTextureNone
.ForegroundPatternColor = wdColorAutomatic
.BackgroundPatternColor = -603946753
End With
With Options
.DefaultBorderLineStyle = wdLineStyleOutset
.DefaultBorderLineWidth = wdLineWidth075pt
.DefaultBorderColor = 12237498
End With
End Sub

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic