Macro including a background image

Sample Macro including a background image (png file …) in a title page?

May be so?

Sub InsertBackgroundImage
Dim oStyleFamilies As Variant
Dim oPageStyles As Variant
Dim oFirstPageStyle As Variant
Dim oBitmaps
REM 1. Insert image into document (folder Pictures in ZIP)
	oBitmaps = ThisComponent.createInstance( "com.sun.star.drawing.BitmapTable" )
REM First parameter - internal name of image, second - real path to file on disc
	oBitmaps.insertByName( "newBkg", ConvertToURL("C:\Test\BkgImage.png") )
REM 2. Get stile of title page
	oStyleFamilies = ThisComponent.getStyleFamilies()
	oPageStyles = oStyleFamilies.getByName("PageStyles")
	oFirstPageStyle = oPageStyles.getByName("First Page")
REM 3. Set URL of internal image as BackGraphicURL
	oFirstPageStyle.BackGraphicURL = oBitmaps.getByName("newBkg")
	oFirstPageStyle.BackGraphicLocation = com.sun.star.style.GraphicLocation.AREA
REM Now just apply style "First Page" to your document
End Sub