OberonPlace.com Forums  

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

Thread Tools Search this Thread Display Modes
Old 23-03-2006, 04:01
Posts: n/a
Default COPY DropShadow

Alex, Help!!!
How right to copy DropShadow (or all Effects) of Shape to other Shape?

Sub Test()
Dim s1 As Shape, s2 As Shape
Dim cs As Object

Set s1 = ActiveShape ' Object whith dropshadow
Set cs = Application.CorelScript
sid = cs.GetObjectID

Set s2 = ActiveLayer.CreateArtisticText(2.75, 5, "DropShadow")
s2.Text.FontProperties.Size = 45

ds = cs.CopyEffectFrom(True, sid) ' Тут возникает ошибка. Why?
End Sub
Reply With Quote
Old 28-03-2006, 20:44
Alex's Avatar
Alex Alex is offline
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4

Unfortunately VBA doesn't have a way of copying or cloning effects such as dropshadows, contours, etc. The old CorelScript does have a method CopyEffectFrom but since there was no change to that object for years, it doesn't support dropshadows, so it can't copy it.

You might be able to recreate the dropshadow effect by using Shape.CreateDropShadow and specifying all parameters from the existing dropshadow but there is no way of making a clone of the effect that I know of...
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
Copy Layer Mike83 Corel Photo-Paint VBA 0 09-02-2006 08:41
how to copy grouped object and edit its text RichT CorelDRAW/Corel DESIGNER VBA 2 13-09-2005 08:36
DropShadow in CorelPhoto-Paint 12 with VBA dogbertsdad Corel Photo-Paint VBA 1 14-07-2004 08:52
Copy to Adobe Illustrator Macro Tallywhacker Macros/Add-ons 2 24-05-2004 07:07

All times are GMT -5. The time now is 03:48.

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