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 / Publisher / Programming / November 2005

Tip: Looking for answers? Try searching our database.

Evaluate whether shape exists on page one

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mcwhirt3@msu.edu - 24 Nov 2005 23:17 GMT
Hi,

  I have a macro that erases all shapes on a page and basically
restarts a workflow process. However, if no shape exists on the page
the macro fails because it "selects all" shapes and if no shapes exist
it fails. If I could set up a stage of the macro to evaluate whether or
not shape(1) exists on page(1) i could make it skip over the chunk that
looks for shapes all together. I have begun with:

If ActiveDocument.Pages(1).Shapes(1) Is ?does not exist? Then GoTo
skiptwo else continue

I just don't know how to evaluate the existence of an object in the
area between the question marks. Any ideas would be greatly
appreciated. Thanks!
mcwhirt3@msu.edu - 24 Nov 2005 23:32 GMT
Sorry nevermind. I discovered the on error statement right after
posting this. I just included an:

On error goto skip

this solved my problem.
Ed Bennett - 25 Nov 2005 00:01 GMT
mcwhirt3@msu.edu <mcwhirt3@msu.edu> was very recently heard to utter:
> On error goto skip

Be careful using this statement - it if an error occurs after your skip
label (unless you change your On Error code), you could end up with an
infinite loop.

Signature

Ed Bennett - MVP Microsoft Publisher

 
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.