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 / December 2006

Tip: Looking for answers? Try searching our database.

List all shapes on a particular page

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
opop - 24 Dec 2006 11:49 GMT
Hi,

I am writing an VBA application that requires that I am able to itemize
all the shapes on any particular page say the active page or a page
named by its page number.  I have found that the selection function
selects all the shapes in the document, is this possible.

I would appreciate any help

Thanks
Adejare
Helmut Weber - 24 Dec 2006 11:59 GMT
Hi Adejare,

like this:

Sub Test4454()
ActiveDocument.GoTo _
what:=wdGoToPage, _
which:=wdGoToAbsolute, _
Count:=3
MsgBox selection.Bookmarks("\page").Range.ShapeRange.Count
End Sub

The msgbox should show the number of shapes on page 3.

Signature

Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"

opop - 24 Dec 2006 12:23 GMT
Hi Helmut,

This works perfectly.

One last question, is there a shape change event? ie I would like to
monitor if an attribute of   a shape changes.

Adejare

> Hi Adejare,
>
[quoted text clipped - 17 lines]
> Win XP, Office 2003
> "red.sys" & Chr$(64) & "t-online.de"
Helmut Weber - 24 Dec 2006 12:51 GMT
Hi Adejare

>One last question, is there a shape change event? ie I would like to
>monitor if an attribute of   a shape changes.

not to my knowledge.

Signature

Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"


Rate this thread:






 
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.