I'm looping through all of the shape objects to charactorize them and
printing a report of the findings. The issue I have so far is that
inline pictures (non-ole) don't have a name or other distinguishing
info (that I see ATM). It would be much easier to have at least a page
number to reference.
So, how do I find out what page an object is on. I saw the
selection..... solution, but I don't have an active selection.... just
a shape object.
Thanks
Jay Freedman - 04 Feb 2006 03:06 GMT
>I'm looping through all of the shape objects to charactorize them and
>printing a report of the findings. The issue I have so far is that
[quoted text clipped - 7 lines]
>
>Thanks
If you're looping through the document and you're finding inline
shapes, you must be using the InlineShapes collection (which is
separate from the Shapes collection). For that, code like this works:
Dim ILS As InlineShape
For Each ILS In ActiveDocument.InlineShapes
MsgBox ILS.Range.Information(wdActiveEndPageNumber)
Next
Objects in the Shapes collection (floating graphics and textboxes)
don't have a .Range property, but they do have an .Anchor property
that returns a Range, and the shape must always be on the same page as
the anchor, so this works:
Dim Shp As Shape
For Each Shp In ActiveDocument.Shapes
MsgBox Shp.Anchor.Information(wdActiveEndPageNumber)
Next
--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
Jezebel - 04 Feb 2006 03:08 GMT
MyShape.Range.Information(wdActiveEndPageNumber)
> I'm looping through all of the shape objects to charactorize them and
> printing a report of the findings. The issue I have so far is that
[quoted text clipped - 7 lines]
>
> Thanks
LostBoyz69@gmail.com - 08 Feb 2006 21:04 GMT