![]() |
#1
|
|||
|
|||
![]()
I'd like to be able to select an object on one page and then delete all objects on other pages that are within the same space. I tried the following but it is not working:
Code:
Sub DeleteFromSelectedOnOtherlPages() Dim p As Page, s As Shape, n As Integer Dim x As Double, y As Double, w As Double, h As Double ActiveDocument.ReferencePoint = cdrBottomLeft ActiveDocument.Unit = cdrMillimeter n = ActivePage.Index ActiveDocument.selection.GetBoundingBox x, y, w, h, True For Each p In ActiveDocument.Pages If p.Index <> n Then Set s = p.SelectShapesFromRectangle(x, y, w, d, True) If s.Shapes.Count >= 1 Then s.Delete End If Next p End Sub |
#2
|
|||
|
|||
![]()
Found the problem with the SelectShapesFromRectangle. It should read:
Code:
Set s = ActivePage.SelectShapesFromRectangle(x, y, x + w, y + h, False) |
![]() |
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 |
Delete all off-page objects | gorgo2 | Macros/Add-ons | 8 | 18-08-2010 11:09 |
delete text at specific area on all pages? | gorgo | Macros/Add-ons | 4 | 18-05-2010 20:27 |
Delete matching objects | click101 | CorelDRAW/Corel DESIGNER VBA | 2 | 02-06-2008 17:14 |
Delete small objects macro | Jeff Harrison | New product ideas | 3 | 19-05-2007 13:19 |
Delete All Nodes in Selected Area | JudyHNM | CorelDRAW/Corel DESIGNER VBA | 8 | 09-05-2007 18:50 |