document background background background color Matthias Prem How can I change the document's background color? /* DocumentBackground.rex */ /* Macro */ /* get the script context and the Document */ xScriptContext=uno.getScriptContext() oDoc=xScriptContext~getDocument /* The xFamiliesSupplier includes the PageStyles */ xFamiliesSupplier=oDoc~{%see com.sun.star.style.XStyleFamiliesSupplier%XStyleFamiliesSupplier} xStyle=xFamiliesSupplier~getStyleFamilies~getByName("PageStyles")~{%see com.sun.star.container.XNameContainer%XNameContainer} /* the background is part of the PageStyle */ xBackground = xStyle~getByName("Standard")~{%see com.sun.star.beans.XPropertySet%xPropertySet} /* set the background color */ xBackground~setPropertyValue("BackColor", box("int", "123456"x ~c2d)) ::requires UNO.CLS Initial version