again about loop in macro [closed]

asked 2014-03-05 16:51:04 +0200

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Hi, is it possible to repeat a dispatcher command for all the cells in a column? Thanks in advance,

Here is my problem:

dim document as object dim dispatcher as object document = ThisComponent.CurrentController.Frame dispatcher = createUnoService("")

dim args1(0) as new args1(0).Name = "ToPoint" args1(0).Value = "$A$2" dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args1())

dispatcher.executeDispatch(document, ".uno:TextToColumns", "", 0, Array()) -------> I NEED THIS COMMAND TO BE REPEATED FOR ALL THE CELLS ON THAT COLUMN BUT THIS WORKS FOR ONLY THE CELL at "$A$2"

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by Alex Kemp
close date 2016-02-20 06:33:41.244105


Change from a single cell to a range of cells. (Change "$A$2" to "$A$2:$A$10"). It should work for you, but if you still want to loop through each cell individually, then I'll add a loop.

BasicMacro gravatar imageBasicMacro ( 2014-03-06 20:42:46 +0200 )edit