I am trying to toggle the mode of an image (which I have anchored to a cell) to/from default and grayscale. If I record a macro while doing this, I get:
sub mode_default
rem ----------------------------------------------------------------------
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 ----------------------------------------------------------------------
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "ToPoint"
args1(0).Value = "$J$10"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args1())
rem ----------------------------------------------------------------------
rem dispatcher.executeDispatch(document, ".uno:GrafMode", "", 0, Array())
rem ----------------------------------------------------------------------
dim args3(0) as new com.sun.star.beans.PropertyValue
args3(0).Name = "ToPoint"
args3(0).Value = "$J$12"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args3())
end sub
It looks like what I need to do is uncomment the “.uno:GrafMode” line, but I can find no documentation for it. Can anyone help?
Thank you.