OberonPlace.com Forums  

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

Thread Tools Search this Thread Display Modes
Old 10-04-2005, 20:22
Posts: n/a
Default Copy Properties > all

Hi all,
I am using v12. I cant seem to find a CopyProperties method (i think that would be a method), anywhere. I would think there would be something that would simply getAllProperties and be assignable to someOther.shape
I found something in the corelScript section of the object model reference. Im not sure this would work. Any suggestions???
Thanx, Andy
Reply With Quote
Old 10-04-2005, 22:25
Alex's Avatar
Alex Alex is offline
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4
Default Re: Copy Properties > all

Yes, you are right. Right now there is no direct way of using CopyPropertiesFrom command in VBA. You can resort to CorelScript's implementation of it but it is very cumbersome. CS's command works with pre-recorded shape indices which is quite difficult to obtain.

Anyway, you can use this function in VBA to do the job:

Sub CopyPropertiesFrom(ByVal ShapeFrom As Shape, ByVal ShapeTo As Shape, _
                        ByVal OutlinePen As Boolean, ByVal OutlineColor As Boolean, _
                        Fill As Boolean, TextAttributes As Boolean)
    Dim cs As Object
    Set cs = CorelScript
    cs.CopyPropertiesFrom 1, OutlinePen, OutlineColor, Fill, TextAttributes
End Sub
However if you just need to copy fill or ouline, just assign them from one object to another, like this:

Shape1.Fill = Shape2.Fill
Reply With Quote
Old 18-04-2005, 14:50
Posts: n/a
Default Re Copy Properties answer

thanx Alex as always you are a great help.
Any idea if the vba is going to change with v13. More funtionality?
Just curious.
Best regards Andy
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
How can I copy an Envelope? RobC CorelDRAW/Corel DESIGNER VBA 13 11-04-2008 13:33
Find objects by properties Webster CorelDRAW/Corel DESIGNER VBA 8 01-12-2004 18:51
Reading Font Properties from selected text in CD9 sherman01 CorelDRAW/Corel DESIGNER VBA 2 24-11-2004 07:59
Copy to Adobe Illustrator Macro Tallywhacker Macros/Add-ons 2 24-05-2004 07:07
Converting objects color properties jwknight CorelDRAW/Corel DESIGNER VBA 1 23-10-2003 10:03

All times are GMT -5. The time now is 12:25.

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