find out if page is created

How i can find out if the page is created. and the corel draw is not in start screen like picture?

I would like to create a new page in defined size and orientation.

            // set units
            corelApp.ActiveDocument.Unit = corelApp.ActiveDocument.Rulers.HUnits;
            // set canvas size to laser table size
            corelApp.ActiveDocument.ActivePage.SizeHeight = ySize;
            corelApp.ActiveDocument.ActivePage.SizeWidth = xSize;

But this crashes when the corel is on start screen
I need to find out if corel always open and ready with a plain new page.
And if not i need to create this new page (ctrl + n)