Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Mar 2001
    Location
    Silicon Valley, California, USA
    Posts
    273
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Select All Shapes on Current Page

    Hi,

    I have made a few tries of creating a VBA routine that will select all shapes on the current page. However, there seems to be no obvious way of referencing the "current" page (i.e., the one that the cursor is currently on, that determines the values in the status bar, "Page 1, Sec 1, 1/1").

    I have tried looping through the Shapes collection and determining where the anchor "is", but there seems to be no way to tell much other than what paragraph (index) it is attached to (and there seems to be no obvious way of determining what page that paragraph is currently "on").

    Any suggestions? In my documents, generally all the shapes on a given page are anchored to the same paragraph, if this is helpful.

    Thanks!

  2. #2
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts

    Re: Select All Shapes on Current Page

    Hi Jim,

    The following should do - this uses the built-in bookmark "Page" to get to the contents of the current page:

    Public Sub SelectAllShapesOnPage()
    ActiveDocument.Bookmarks("Page").Range.ShapeRange. Select
    End Sub

    Gary

  3. #3
    3 Star Lounger
    Join Date
    Mar 2001
    Location
    Silicon Valley, California, USA
    Posts
    273
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Select All Shapes on Current Page

    Fantastic! Thank you a ton!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •