Rebonjour,
J'ai essayé le code de Laurent il marche mais il y a un "+" oublié.
Je me suis permis de le rajouter dans le code ci-dessous en bleu.
A bientôt,
Thierry
----------------------------------------------------------------------
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
dim args1(0) as new com.sun.star.beans.PropertyValue
dim args2(0) as new com.sun.star.beans.PropertyValue
args2(0).Name = "MoveContents"
args2(0).Value = true
for i = 2 to 5000
args1(0).Name = "ToPoint"
args1(0).Value = "$B$" + cstr(i) + ":$C$"+cstr(i)
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args1())
dispatcher.executeDispatch(document, ".uno:ToggleMergeCells", "",
0, args2())
next i
----------------------------------------------------------------------