OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Corel User Forums > CorelDRAW > Macros/Add-ons

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-03-2010, 06:28
AdrianD
Guest
 
Posts: n/a
Default How to select the newly duplicated shape

I have a macro that correctly duplicates and positions my selected shape.
All I need now is for the macro to change the currently selected shape, ie something like : dup1.SetAsCurrentShape.

I guess this is straightforward, but I cant see from help files.

Sub Duplicate_45_D_R()
' Recorded 05/03/2010
'ActiveDocument.Unit = cdrMillimeter
Dim dblX As Double

dblX = 800 ^ 0.5

Dim OrigSelection As ShapeRange
Set OrigSelection = ActiveSelectionRange
Dim dup1 As ShapeRange
Set dup1 = OrigSelection.Duplicate
dup1.Move dblX, -dblX

End Sub
Reply With Quote
  #2  
Old 05-03-2010, 08:17
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,787
Blog Entries: 11
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default SelectShape

To select the duplicate you need to create a selection like this:
Code:
Sub Duplicate_45_D_R()
    Dim dblX As Double
    Dim OrigSelection As ShapeRange
    Dim dup1 As ShapeRange

    dblX = 800 ^ 0.5
    
    Set OrigSelection = ActiveSelectionRange
    Set dup1 = OrigSelection.Duplicate
    
    dup1.Move dblX, -dblX
    dup1.CreateSelection
End Sub
Best of luck,

-Shelby
Reply With Quote
  #3  
Old 06-03-2010, 01:44
AdrianD
Guest
 
Posts: n/a
Default Select Shape

Thank you, that worked just fine.
Reply With Quote
Reply

Tags
duplicated, select, shape


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Replace shape with another shape dungbtl CorelDRAW/Corel DESIGNER VBA 24 28-12-2019 04:56
Select objects within a shape nic Macros/Add-ons 10 20-08-2010 05:36
Changing selection when two-shape group loses one shape Joe CorelDRAW/Corel DESIGNER VBA 1 19-02-2009 02:50
How to select all shape ? -=HKLC=- CorelDRAW/Corel DESIGNER VBA 1 25-10-2004 00:10
Select All ddonnahoe CorelDRAW/Corel DESIGNER VBA 4 10-02-2004 09:14


All times are GMT -5. The time now is 04:06.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com