How do i iterate through picture collection?

J

JethroUK©

How do i iterate through picture collection in the Active Doc?

I've tried 'Shapes' collection, but it only seems to find some of the
pictures, but not all
 
J

JethroUK©

so if i look through shapes collection & inlineshapes collection i'll cover
them all - thanx
 
J

JethroUK©

this errors on the very first picture it finds - can you see what's wrong
with it?:

With ActiveDocument
If .Shapes.Count > 0 Then
With .Shapes
For x = 1 To .Count
.Item(x).Select
Selection.Cut
Selection.PasteAndFormat (wdPasteDefault) <<<<<<<<<<<
error here (on item 1)
Next
End With
End If
If .InlineShapes.Count > 0 Then
With .InlineShapes
For x = 1 To .Count
.Item(x).Select
Selection.Cut
Selection.PasteAndFormat (wdPasteDefault)
Next
End With
End If
End With
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top