OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > CorelDRAW/Corel DESIGNER VBA

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-05-2007, 21:35
knowbodynow knowbodynow is offline
Senior Member
 
Join Date: Mar 2006
Location: Hatsukaichi near Hiroshima
Posts: 434
Default Problem with positioning a duplicate

Hello,

Is the following code OK? I'm trying to create a duplicate that aligns to another object.

Code:
Sub duptoVposition()

Dim s1 As Shape
Dim y1 As Double, y2 As Double
Dim setrevoffset As String

ActiveDocument.Unit = cdrMillimeter

If ActiveDocument Is Nothing Then End
           
If ActiveSelection.Shapes.Count = 2 Then

    y1 = ActiveSelection.Shapes(1).PositionY
    y2 = ActiveSelection.Shapes(2).PositionY

    setrevoffset = y2 - y1

    Set s1 = ActiveSelection.Shapes(1).Duplicate(, setrevoffset)
    s1.CreateSelection

End If

End Sub
CorelDraw is currently duplicating the object way off the page and I don't know why.

Thanks,

Chris (Hunt)
Reply With Quote
 


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
Selected object to other page Duplicate method ? ljesus7 CorelDRAW/Corel DESIGNER VBA 5 12-02-2007 17:37
Querious Problem. amollondhe CorelDRAW/Corel DESIGNER VBA 1 31-03-2006 09:40
CD11 Convert to Bitmap -> CMYK to Gray scale problem xenio General 7 24-07-2005 22:46
a problem... CorelUser General 2 20-06-2004 03:21
Problem with Export (or Save as) in AI-Format LOT CorelDRAW/Corel DESIGNER VBA 3 10-02-2004 15:28


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


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