Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-10-2012, 08:37 AM
TishyMouse TishyMouse is offline Can't select shapes via macro Windows XP Can't select shapes via macro Office 2007
Novice
Can't select shapes via macro
 
Join Date: Feb 2012
Posts: 22
TishyMouse is on a distinguished road
Question Can't select shapes via macro

I have a word documents created from a converted PDF. I'm trying to programatically select in turn the shapes within the document. If I create a test macro, place a break point in it with a watch expression ActiveDocument.Shapes.Count and run it I can see that there are >2000 of shapes in the document; however the code inside a 'for each shape...' loop never gets executed.



Note that if I copy and paste the shape into a new document the macro works.

The code I am using is:

Sub SelectShapes()

Dim sh As Shape

For Each sh In ActiveDocument.Shapes
sh.Select
'Will do some other things here
Next

End Sub

Any ideas what might be going on here?

Thanks!
Reply With Quote
 

Tags
shapes



Similar Threads
Thread Thread Starter Forum Replies Last Post
Select Series Color - Macro judicial85 Excel Programming 0 03-14-2011 02:35 PM
Can't select shapes via macro Where did map shapes go? SueK PowerPoint 1 01-20-2011 04:30 AM
Can't select shapes via macro Find and add new Shapes bonani PowerPoint 1 11-26-2009 06:21 PM
Shapes Will Not Display JoeTx Visio 0 03-13-2008 09:01 AM
My Shapes some appear some don't Jean-Paul Visio 0 03-01-2006 01:38 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:48 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft