printer paper size

Hello,

I am trying to automate print process and in a part of my macro I have Model.PageSetup.PrinterPaperSize = 17 to select 11x17 paper size to print on. The code does not seem to change whatever is already selected. Any idea why it happens?

Thank you,

Hossein

SolidworksApi macros