One idea is to get page width and height
from cells PageWidth and PageHeight of
PageSheet, ex,
PgWi=objPage.PageSheet.Cells("PageWidth")
PgHi=objPage.PageSheet.Cells("PageHeight")
,
and to decide ThisDocument.PaperSize in your
own program.
It works the other way around, you can set the page size equal to the
printer page size. You will have to select a printer page size supported by
the printer.