1

I have 100+ Word documents each with 1000+ pictures. I need to "view" all of them one by one in a doc and also count the total number of pics in a document.

I tried using "Find Graphics" ---"^g". However it does not locate all the pics.

After experimentation, I realized that if a graphic's Wrap Text value is set to "In Line with Text" only then it is treated as a graphic and gets located in a Find!

Is there any way to locate all the pictures in a document one after the other and also get a count all of them in one document?

1
  • have you tried anything on your own, I mean record a macro or serach in internet for any solution? in general- there is InlineShapes and Shapes collection which you are looking for. Try with simple For each loop in reference to both type of shapes. And something more- please see this info for how to accept the answer(if applicable for any of your question) Mar 16, 2014 at 13:17

1 Answer 1

0

To view the total number of images in a document, you can use something like the following:

MsgBox ActiveDocument.InlineShapes.Count

A wrapper you could use to loop through them is:

For Each iShape In ActiveDocument.InlineShapes
    stuff
Next

One option is to step into the macro and use F8 to step through the code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.