Question

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?

Était-ce utile?

La solution

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.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top