While using the macro recorder I end up with:
- Code: Select all Expand viewCollapse view
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 ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:FormatArea", "", 0, Array())
which, when running the macro, obviously opens the color table to chose from and the rest has to be done manually (I did not expect anything else with the macro recorders property not to record, what's happening in another window).
I was unable to find parameters to hand over to uno:FormatArea which would result in an automatic change. I tried e.g.
- Code: Select all Expand viewCollapse view
dim args4(0) as new com.sun.star.beans.PropertyValue
args4(0).Name = "BackgroundColor"
args4(0).Value = RGB(250,0,0)
rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:FormatArea", "", 0, args4())
but it also only opens the color panel to continue manually with.
The drawing is an object "com.sun.star.comp.framework.Frame". Using uno:BackgroundColor did not work (nothing happens). I have tried to find properties to change, but was not able (maybe lack of experience with openoffice programming).
Is there anybody out there who knows, whether I can force FormatArea to do the job automatically, or whether I could try anything else?

