OberonPlace.com Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-01-2003, 01:33
dominiqueL
Guest
 
Posts: n/a
Default CorelScript to VBA

Hello,
I translate a script in VBA and come up against some problémeses.
Could give me to you the translation of the following orders in VBA:

Rect1& = CorelScript.GetObjectsCDRStaticID ()
.
.
.
CorelScript.SelectObjectOfCDRStaticID Rect1
ActiveShape.Delete


I thank you
Cordially
P.S.: Excuse my approximate English
Reply With Quote
  #2  
Old 09-01-2003, 15:00
bbolte
Guest
 
Posts: n/a
Default

can you tell us what is actually going wrong? does it not delete the object?
Reply With Quote
  #3  
Old 10-01-2003, 01:21
dominiqueL
Guest
 
Posts: n/a
Default CorelScript to VBA

Hello,
the function works well, the object is erased.But I would like to replace the CorelScript order by a VBA order.
Cordially
Reply With Quote
  #4  
Old 17-01-2003, 12:52
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4
Default Re: CorelScript to VBA

Quote:
Originally Posted by dominiqueL
Rect1& = CorelScript.GetObjectsCDRStaticID ()
.
.
.
CorelScript.SelectObjectOfCDRStaticID Rect1
ActiveShape.Delete
Instead of using CorelScript object you need to do the following in VBA:

Code:
Sub SomeMacro()
    Dim Rect1 As Shape
    Set Rect1 = ActiveShape
    ' .
    ' .
    ' .
    Rect1.Delete
End Sub
So, here you define a variable Rect1 that will hold the reference to your rectangle. Then when you no longer need the rectangle, just use Rect1 to delete it...
Reply With Quote
  #5  
Old 19-01-2003, 00:29
dominiqueL
Guest
 
Posts: n/a
Default Thank you

thank you alex,
this solution allowed me to take all call in a CorelScript order
Cordially
Dominique
Reply With Quote
Reply


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
delete vba project from cdr file hotairballoon CorelDRAW/Corel DESIGNER VBA 1 18-05-2005 09:08
CD 10, VBA not returning true outline width Webster CorelDRAW/Corel DESIGNER VBA 1 24-11-2004 17:09
Would you miss CorelScript object? Alex CorelDRAW/Corel DESIGNER VBA 32 04-02-2004 14:59
speed difference between corelscript and vba bbolte CorelDRAW CS 2 05-12-2002 17:58
Detect if VBA is installed (an answer and a question) reanan CorelDRAW/Corel DESIGNER VBA 3 04-12-2002 14:35


All times are GMT -5. The time now is 19:09.


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