Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / February 2006

Tip: Looking for answers? Try searching our database.

Find out current page of a shape object

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
LostBoyz69@gmail.com - 03 Feb 2006 23:55 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
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.