number of objects in a document

M

Marko Kirschner

Hello!
AFAIK is Word since version 6 using a kind of structured
storage method (COM) to save the data.
I'm looking for a tool/way, to find out how many objects in
such a word document are.
I already tried Compound File Explorer, but that gives me
not a useful information.

Thanks for hints.
Cheers
 
M

macropod

Hi Marko,

The following macro lists all embedded shapes in a document:

Sub FindShapes()
If ActiveDocument.Shapes.Count > 0 Then
For Each Shp In ActiveDocument.Shapes
ShapeNames = ShapeNames & Shp.Name & vbCr
Next Shp
MsgBox "Found Shapes:" & vbCr & ShapeNames
End If
End Sub


If you just want a count, you could use:

Sub CountShapes()
MsgBox ActiveDocument.Shapes.Count
End Sub

Change "Shapes" throughout to identify "InLineShapes", "Fields", etc.


Cheers
 

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