2015-05-13 54 views

回答

0

我發現這是把頁眉和頁腳註銷的方式:

Dim oDoc As Object 
Dim oSheet As Object 
Dim oStyles As Variant 
Dim oPstyle As Variant 

oDoc=ThisComponent 

oSheet=oDoc.Sheets.getByName("Sheet1") 

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