![]() |
#1
|
|||
|
|||
![]()
I have several Artistic Text rotated at different angle in a drawing. Now when I mirror the drawing the text is also mirrored. So how can I remove the mirror while preserving the new rotation angle (all the mirrored text is in different layer so selecting all the mirrored text at once would be easy)
Since I dont konw vb what I tried is Sub RimoveMirror() Dim OrigSelection As ShapeRange Set OrigSelection = ActiveSelectionRange RAng = OrigSelection.RotationAngle Dim dup1 As ShapeRange Set dup1 = OrigSelection.Duplicate() dup1.ClearTransformations dup1.RotationAngle = RAng OrigSelection.Delete End Sub I thought that I will duplicate the selected text -- apply clear transformation to the duplicated text and ask it to copy rotation angle from the original selection and delete the original selection. But I am getting nowhere. |
#2
|
||||
|
||||
![]()
You almost have it and are on the right track...basically you need to.
1. Find all the text objects 2. Get their rotation angles 3. Mirror each piece of text back 4. Set the rotation angle back adjusting for the mirror* *If you take a normal piece of text, horizontally mirror it look at the rotation angle it is 180 degrees. So when we set the angle back we have to adjust for this shift. Hope that make sense. Do you code might look something like this. Code:
Sub FixText() Dim s As Shape Dim dblRotate As Double Optimization = True 'Stop the screen for redrawing (aka speed up the macro) For Each s In ActivePage.Shapes.FindShapes(Type:=cdrTextShape) 'Find all the text objects dblRotate = s.RotationAngle 'Get the angle of the shape s.Flip cdrFlipHorizontal 'Flip the shape back s.RotationAngle = dblRotate - 180 'Set the angle adjusting for the horizantal mirror shift Next s Optimization = False 'Turn screen redrawing back on ActiveWindow.Refresh 'Refresh the window Application.Refresh 'Refresh the Application End Sub -Shelby |
#3
|
|||
|
|||
![]()
Hi Shelbym Thanks once again, This saves lot lot of time.
I just changed ActivePage to ActiveSelection. Since otherwise it mirrored the non mirrored text also. Thanks a lot. |
![]() |
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 |
How selected a part of text | TheFez | CorelDRAW/Corel DESIGNER VBA | 2 | 22-05-2008 07:07 |
Changing Selected text | knowbodynow | CorelDRAW/Corel DESIGNER VBA | 2 | 17-10-2007 08:49 |
Remove Paragraph marks from artistic text | knowbodynow | CorelDRAW/Corel DESIGNER VBA | 2 | 31-03-2006 18:48 |
corelDRAW paragraph text mirror "bug" | hellraeser | General | 2 | 08-03-2006 23:17 |
Where is the selected text? | petig | CorelDRAW/Corel DESIGNER VBA | 7 | 16-05-2005 15:30 |