I'm new in c# and in Corel. I try to use .PageChange commend. Maybe can i change page by name?. I have 22 pages in document.
CorelDRAW.Application cdr = new CorelDRAW.Application(); cdr.Visible = false; cdr.OpenDocument(@"C:\software\Corel\xxxx.cdr"); cdr.ActiveDocument.Activate(); cdr.ActiveDocument.PageChange += ??? MessageBox.Show(cdr.ActivePage.Name);
I read a little bit and now i know how too change page :]
Layer lrIT1 = cdr.ActiveDocument.Pages[32].Layers.Find("txt");
If you want to activate a page by its name you can do this with those lines:I'm not familiar with C++, I'm using VBA. But I guess, you can read out of the lines the way you can do it.Dim CurDoc As Document, CurPg As Page, Pg As PageSet CurDoc = ActiveDocumentFor Each Pg In CurDoc.Pages If UCase(Pg.Name) = "MYPAGE" Then Set CurPg = Pg CurPg.Activate End IfNext PgBut you should be aware, that CD allows more pages with the same name in a document!