All pastes #738369 Raw Edit

stanman

public text v1 · immutable
·published 2007-10-16 07:17 UTC
rendered paste body
sub htmlHeaderFooterKill
rem ----------------------------------------------------------------------
rem define variables
dim document   as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document   = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")

rem ----------------------------------------------------------------------
dim args1(1) as new com.sun.star.beans.PropertyValue args1(0).Name = "PageStyle"
args1(0).Value = "HTML"
args1(1).Name = "On"
args1(1).Value = false

dispatcher.executeDispatch(document, ".uno:InsertPageHeader", "", 0, args1())

rem ----------------------------------------------------------------------
dim args2(1) as new com.sun.star.beans.PropertyValue args2(0).Name = "PageStyle"
args2(0).Value = "HTML"
args2(1).Name = "On"
args2(1).Value = false

dispatcher.executeDispatch(document, ".uno:InsertPageFooter", "", 0, args2())