Page 1 of 1

Print setting by vb.net

Posted: Sun Dec 16, 2012 12:06 am
by keosge
This time i think i try an hard quest.

I need to set by VB.net code the page style of sheet to autofit print area; i can set this by Format Menus-> Page -> sheet tab, scale option.

I don't know where to start to search.....

thank a lot

Re: Print setting by vb.net

Posted: Sun Dec 16, 2012 1:47 am
by Charlie Young
keosge wrote:This time i think i try an hard quest.

I need to set by VB.net code the page style of sheet to autofit print area; i can set this by Format Menus-> Page -> sheet tab, scale option.

I don't know where to start to search.....

thank a lot
A quickie, so just regard it is a starting point.

Code: Select all

oStyles = oDoc.getStyleFamilies()
PageStyles = oStyles.getByName("PageStyles")
DefaultPageStyle = PageStyles.getByName("Default")
The PageStyles will be full of properties discussed here.