![]() |
#1
|
|||
|
|||
![]()
What is the simplest way to select all objects on a page without including all those on the desktop?
Code:
dim s as Shape For Each s In activepage.Shapes s.AddToSelection Next s |
#2
|
||||
|
||||
![]()
Alright I will give you two ways to do this. The first is simply to remove the shapes on the desktop from all the shapes. You can do this like this:
Code:
Sub SelectAllExcludeDesktop() Dim sr As ShapeRange Set sr = ActivePage.Shapes.All sr.RemoveRange ActiveDocument.MasterPage.Layers("Desktop").Shapes.All sr.CreateSelection End Sub Code:
Sub SelectAllExcludeDesktopCQL() ActivePage.Shapes.FindShapes(Query:="!@com.layer.name = 'desktop'").CreateSelection End Sub Code:
Sub SelectAllExcludeDesktopCQL() ActivePage.Shapes.FindShapes(Query:="not@com.layer.name = 'desktop'").CreateSelection End Sub Code:
Sub SelectAllExcludeDesktopCQL() ActivePage.Shapes.FindShapes(Query:="@com.layer.name <> 'desktop'").CreateSelection End Sub -Shelby Last edited by shelbym; 29-01-2012 at 15:02. |
#3
|
|||
|
|||
![]()
Thanks for the alternatives, Shelby. After posting I came up with this:
Code:
For Each l In p.Layers For Each s In l.Shapes If l.Name <> "Desktop" Then s.AddToSelection Next s Next l Chris |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Select all items on current page (within print area) | fungel | Feature requests/wishlist | 1 | 20-10-2010 11:58 |
Select objects within a shape | nic | Macros/Add-ons | 10 | 20-08-2010 06:36 |
Is there a way to select all objects on page..... | LGD | CorelDRAW/Corel DESIGNER VBA | 2 | 10-11-2006 15:04 |
How to select objects of the same color? | Alex | FAQ | 6 | 08-07-2005 00:42 |
Select objects inside another | shelbym | CorelDRAW/Corel DESIGNER VBA | 1 | 25-11-2003 17:01 |