sub CLAtoA11 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 = "Protect" args1(0).Value = false dispatcher.executeDispatch(document, ".uno:Protect", "", 0, args1()) rem ---------------------------------------------------------------------- dim args2(0) as new com.sun.star.beans.PropertyValue args2(0).Name = "Nr" args2(0).Value = 4 dispatcher.executeDispatch(document, ".uno:JumpToTable", "", 0, args2()) rem ---------------------------------------------------------------------- dim args3(0) as new com.sun.star.beans.PropertyValue args3(0).Name = "ToPoint" args3(0).Value = "$A$5" dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args3()) rem ---------------------------------------------------------------------- dim args4(0) as new com.sun.star.beans.PropertyValue args4(0).Name = "By" args4(0).Value = 1 dispatcher.executeDispatch(document, ".uno:GoRightSel", "", 0, args4()) rem ---------------------------------------------------------------------- dim args5(0) as new com.sun.star.beans.PropertyValue args5(0).Name = "By" args5(0).Value = 1 dispatcher.executeDispatch(document, ".uno:GoRightSel", "", 0, args5()) rem ---------------------------------------------------------------------- dim args6(0) as new com.sun.star.beans.PropertyValue args6(0).Name = "By" args6(0).Value = 1 dispatcher.executeDispatch(document, ".uno:GoRightSel", "", 0, args6()) rem ---------------------------------------------------------------------- dim args7(0) as new com.sun.star.beans.PropertyValue args7(0).Name = "By" args7(0).Value = 1 dispatcher.executeDispatch(document, ".uno:GoRightSel", "", 0, args7()) rem ---------------------------------------------------------------------- dispatcher.executeDispatch(document, ".uno:Copy", "", 0, Array()) rem ---------------------------------------------------------------------- dim args9(0) as new com.sun.star.beans.PropertyValue args9(0).Name = "Nr" args9(0).Value = 1 dispatcher.executeDispatch(document, ".uno:JumpToTable", "", 0, args9()) rem ---------------------------------------------------------------------- dim args10(0) as new com.sun.star.beans.PropertyValue args10(0).Name = "ToPoint" args10(0).Value = "$A$11" dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args10()) rem ---------------------------------------------------------------------- dispatcher.executeDispatch(document, ".uno:Paste", "", 0, Array()) rem ---------------------------------------------------------------------- dim args12(0) as new com.sun.star.beans.PropertyValue args12(0).Name = "ToPoint" args12(0).Value = "$A$12" dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args12()) rem ---------------------------------------------------------------------- dim args13(0) as new com.sun.star.beans.PropertyValue args13(0).Name = "Protect" args13(0).Value = true dispatcher.executeDispatch(document, ".uno:Protect", "", 0, args13()) end sub