Hi i am Yogesh Sharma... i am c# developer and i want to add image file to a cdr file using c# code... i
searched google but failed.....
Please Help With example.....thanks in advance...
Hi,
From where the code will be run? from outside app or from inside of CorelDRAW?
Hi Sir...
The code will run from c# windows application.....
details.........
i am having a cdr file(already created) in which i have to add an image on a curve shape object from c# windows application....
thanks..
In any case, you need have installed CorelDRAW. You have to open your document in CorelDRAW and import your image. And looks like you want to place it into container (powerclip).
This is a vba code (not really different with C#):
Set d = CorelDRAW.OpenDocument("C:\file.cdr")d.ActiveLayer.ImportEx "C:\file.jpg"Set s = d.ActiveShapes.AddToPowerClip YourCurveShape
Help about each function you can find in Program Files\Corel\CorelDRAW Graphics Suite X6\Data\draw_om.chm
Thanks Sir...Your code works fine for me..except little changes....Sorry for replying late...
I have 2 more questions
1) HOW SHOULD I IMPORT IMAGE FILE TO SOME PARTICULAR CURVESHAPE ie: I HAVE TWO CURVE SHAPE FROM WHICH I NEED TO IMPORT IMAGE IN ANY ONE....HOW SHOULD I DO THIS??
2) I HAVE 4 TEXTSHAPE IN A CURVESHAPE..ALL THESE TEXTSHAPE CONTAINS SOME TEXT..WHICH I NEED TO REPLACE WITH SOME NEW TEXT....HOW SHOULD I DO THIS...???
PLEASE SUGGEST SOME SOLUTION...