Ask Your Question
0

Calc - Header & Footer - Background Color: No Custom Colors Selection UI

asked 2017-11-14 12:31:12 +0100

PeterLairo gravatar image

updated 2017-11-14 12:32:30 +0100

I want to select custom colors for my header and footer background in LibreOffice Calc (ver. 5.x) but it is not possible.

Under Page Settings / Header / Additional (German: "Zusätze") / Background, the UI does not provide a way to select the Custom (or User, German: "Benutzerdefiniert") color palette. In Writer, the UI is different, and it is possible to select other color palettes there.

Is there a workaround? Is this a known Issue/bug? Could you please tell me the URL to the bug - I couldn't find it.

Thank you.

edit retag flag offensive close merge delete

Comments

https://bugs.documentfoundation.org/s... - all "Enable custom color ..." bugs get duplicated to it.

See also https://ask.libreoffice.org/en/questi...

Mike Kaganski gravatar imageMike Kaganski ( 2017-11-14 12:45:58 +0100 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2017-11-14 14:31:28 +0100

librebel gravatar image

updated 2017-11-14 14:37:39 +0100

Hello @PeterLairo,

a Custom background color for Page Headers and Footers can be set using a macro:

Sub Set_Custom_Page_Header_And_Footer_BackgroundColor( Optional strPageStyleName As String )
    If IsMissing( strPageStyleName ) Or strPageStyleName = "" Then strPageStyleName = "Default"
    Dim oDoc as Object          : oDoc = ThisComponent
    Dim oPageStyles as Object   : oPageStyles = oDoc.getStyleFamilies().getByName( "PageStyles" )
    Dim oPageStyle As Object    : oPageStyle = oPageStyles.getByName( strPageStyleName )

    oPageStyle.HeaderBackColor = RGB( 2, 220, 255 )     REM <---- Set here your desired colors.
    oPageStyle.FooterBackColor = RGB( 2, 255, 220 )
End Sub
edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-11-14 12:31:12 +0100

Seen: 15 times

Last updated: Nov 14