Click here to Skip to main content
16,017,650 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
bom dia
estou tentando fazer o corel draw abrir um arquivo automaticamente
más nao sei muito de c#

From Bing Translate:
Quote:
Good morning I'm trying to make Corel Draw open a file automatically
Más do not know much of C#


What I have tried:

esse é o codigo em vba

Quote:
That's the code in VBA


VB.NET
Sub DocumentOpen()
  Dim doc As Document
  Set doc = OpenDocument("C:\Flower.cdr")
  With doc
    .AddPages (1)
    .ActiveLayer.CreateEllipse(0, 3, 5, 1).Fill.UniformColor.CMYKAssign 0, 100, 100, 0
    .Save
  End With
End Sub


preciso fazer isso em c#
Quote:
Need to do this in C#


seria isso:
Document OpenDocument(string FileName, int CodePage = 0);

porem nao sei como fazer
Quote:
But I don't know how to do


essa é a pagina que explica
Quote:
This is the page that explains

https://community.coreldraw.com/sdk/api/draw/18/m/application.opendocument?lang=cs

se alguem puder ajudar fico muito grato
Quote:
If anyone can help I'm very grateful
Posted
Updated 21-Jan-19 6:22am
v2
Comments
#realJSOP 15-Jan-19 14:56pm    
Post your questions in English.

Try:
C#
Process.Start(@"C:\Flower.cdr");
 
Share this answer
 
Comments
RickZeeland 15-Jan-19 15:54pm    
Ai ai ai caramba !
Maciej Los 15-Jan-19 17:20pm    
Nope, it won't help in editing cdr file via c#.
Set doc = OpenDocument("C:\Flower.cdr")

*/
{
var withBlock = doc;
withBlock.AddPages(1);
withBlock.ActiveLayer.CreateEllipse(0, 3, 5, 1).Fill.UniformColor.CMYKAssign(0, 100, 100, 0);
withBlock.Save();
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900