Hi
Hope someone’s can help me with this. I am trying to create a macro that will gradually reveal a previously written list every time I click a button. I hide the text in the cells by changing it to white on white background and what I want the macro to do is to move to a cell below the current and to change the text color to black.
I thought it would be easy to just record a macro with two sub routines and perhaps edit them a bit. But no matter how i do it only one routine works, moving to the cell below - Unless I manually select a cell first.
Does anybody have an answer to why it doesn’t work.
Code posted below:
Edited for clarity:
Sub Main
End Sub
sub Reveal_text
rem ----------------------------------------------------------------------
rem define variables dim document as object dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoServ("com.sun.star.frame.DispatchHelper")
rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:JumpToNextCell", "", 0, Array())
rem ----------------------------------------------------------------------
dim args2(0) as new com.sun.star.beans.PropertyValue
args2(0).Name = "Color"
args2(0).Value = 0
dispatcher.executeDispatch(document, ".uno:Color", "", 0, args2())
end sub