![]() |
#1
|
||||
|
||||
![]()
I am working in X6. I have a rectangle shape that I am using as a powerclip frame. Within the powerclip is an artistic text shape named "example". Currently the font for the text is Arial, but I want to change it via VBA. I have tried to use
Code:
Set s = ActiveLayer.FindShape("example")
__________________
Sean Waiting for a ride in the T.A.R.D.I.S. |
#2
|
||||
|
||||
![]()
FindShape or FindShapes will dig into groups but no powerclips, if you want to dig into powerclips you will need to make your own function. Here is a version of mine:
Code:
Function FindAllShapes() As ShapeRange Dim s As Shape Dim srPowerClipped As New ShapeRange Dim sr As ShapeRange, srAll As New ShapeRange If ActiveSelection.Shapes.Count > 0 Then Set sr = ActiveSelection.Shapes.FindShapes() Else Set sr = ActivePage.Shapes.FindShapes() End If Do For Each s In sr.Shapes.FindShapes(Query:="!@com.powerclip.IsNull") srPowerClipped.AddRange s.PowerClip.Shapes.FindShapes() Next s srAll.AddRange sr sr.RemoveAll sr.AddRange srPowerClipped srPowerClipped.RemoveAll Loop Until sr.Count = 0 Set FindAllShapes = srAll End Function Code:
Sub FindByName() Dim s As Shape Set s = FindAllShapes.Shapes.FindShape("Example") s.Fill.UniformColor.CMYKAssign 0, 0, 100, 0 End Sub -Shelby |
![]() |
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 |
Extract Multiple Powerclips | dungbtl | CorelDRAW/Corel DESIGNER VBA | 2 | 15-04-2007 10:06 |
FindShapes Selection irregularity | Shaddy | CorelDRAW/Corel DESIGNER VBA | 2 | 18-07-2006 20:41 |
[VBA] FindShapes reduced behaviour in X3 ;-( | wOxxOm | CorelDRAW/Corel DESIGNER VBA | 0 | 05-06-2006 10:50 |