[SOLVED] How to disable header and footer in Calc Macro code?,

Hello,
how can I disable header and footer in code?

I mean about the same action which I would do manually by entering options:
Print view->Format page->Header[/Footer]->uncheck Header on [/ Footer on]

Thanks!
A.

Solved:

oDoc = ThisComponent
oSheet = ThisComponent.getCurrentController().activesheet

oStyles = oDoc.StyleFamilies.getByName( "PageStyles" )
oPstyle = oStyles.getByName( oSheet.PageStyle )
oPstyle.HeaderOn = FALSE
oPstyle.FooterOn = FALSE
1 Like

Thanks, man! You helped me a lot!!