fabian ,

You can find it in the "page styles"

Find my code belmow to handle some "text" i placed in a textframe (named "MyFooterFrame" )in the footer, you can do the same with the Header. Do a xray on the pagestyles to have additional information about the Header.

Hop it helps

Fernand

Sub FooterText
' On Local Error GoTo GeenFooterFrame
 If (Not GlobalScope.BasicLibraries.isLibraryLoaded("Tools")) Then
           GlobalScope.BasicLibraries.LoadLibrary("Tools")
 End If
oDocument = thisComponent
oStyles = oDocument.getStyleFamilies.getByName("PageStyles")
oFrames = oDocument.getTextFrames
xray ostyles.getbyindex(0)
oFooterframe = Oframes.getByName("MyFooterFrame")

oFooterText = oFooterFrame.Text
oFootertext.setstring("")
oFooterCursor = oFooterText.createTextCursor()
oFooterText.insertString(oFooterCursor, FileNameoutofPath(oDocument.Url , "/") , true)
exit sub

GeenFooterFrame:
beep
msgbox( "Er is geen ""FooterFrame"" meer, copieer het frame uit een ander document en ga verder" ,48)
exit sub

End Sub

Hi,

I want to find out the height of a document's header. Reading out the attribute 
HeaderHeight of the page properties only returns 0 and getting the XText of the 
header also didn't get me nowhere so far.

My goal is to insert a graphic at a user specified position of the page and for 
different reasons I can't simply use page as anchor. Therefore I need to know 
the height and width of the page margins and the page header to position the 
image independently of those dimensions.

Has anybody a hint how to get the header's height.

best Fabian.




Reply via email to