sub Calc_ManglerMacro 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(1) as new com.sun.star.beans.PropertyValue args1(0).Name = "By" args1(0).Value = 1 args1(1).Name = "Sel" args1(1).Value = false dispatcher.executeDispatch(document, ".uno:GoUp", "", 0, args1()) rem ---------------------------------------------------------------------- dim args2(1) as new com.sun.star.beans.PropertyValue args2(0).Name = "By" args2(0).Value = 1 args2(1).Name = "Sel" args2(1).Value = true dispatcher.executeDispatch(document, ".uno:GoUp", "", 0, args2()) rem ---------------------------------------------------------------------- dim args3(1) as new com.sun.star.beans.PropertyValue args3(0).Name = "By" args3(0).Value = 1 args3(1).Name = "Sel" args3(1).Value = true dispatcher.executeDispatch(document, ".uno:GoUp", "", 0, args3()) rem ---------------------------------------------------------------------- dim args4(0) as new com.sun.star.beans.PropertyValue args4(0).Name = "StringName" args4(0).Value = "=sum(A1:A3)" dispatcher.executeDispatch(document, ".uno:EnterString", "", 0, args4()) rem ---------------------------------------------------------------------- dispatcher.executeDispatch(document, ".uno:JumpToNextCell", "", 0, Array()) end sub