von mecki_45 » Sa, 13.11.2004 09:00
hab's gelöst - es funktioniert jetzt.
hier der Code:
--------------------------------------------------------
' --- Variablen deklarieren
DIM document as object
DIM dispatcher as object
DIM Args1(0) As New com.sun.star.beans.PropertyValue
DIM Args2(0) As New com.sun.star.beans.PropertyValue
' --- Spalte ausschneiden
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
Args1(0).Name = "ToPoint"
Args1(0).Value = "$G$1:$G$20000"
Dispatcher.executeDispatch (Document, ".uno:GoToCell", "", 0, Args1())
dispatcher.executeDispatch(document, ".uno:Cut", "", 0, Array())
' --- Spalte einfügen
Args2(0).Name = "ToPoint"
Args2(0).Value = "$J$1"
Dispatcher.executeDispatch (Document, ".uno:GoToCell", "", 0, Args2())
dispatcher.executeDispatch(document, ".uno:Paste", "", 0, Array())
-------------------------------------------------------
Alex
hab's gelöst - es funktioniert jetzt.
hier der Code:
--------------------------------------------------------
' --- Variablen deklarieren
DIM document as object
DIM dispatcher as object
DIM Args1(0) As New com.sun.star.beans.PropertyValue
DIM Args2(0) As New com.sun.star.beans.PropertyValue
' --- Spalte ausschneiden
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
Args1(0).Name = "ToPoint"
Args1(0).Value = "$G$1:$G$20000"
Dispatcher.executeDispatch (Document, ".uno:GoToCell", "", 0, Args1())
dispatcher.executeDispatch(document, ".uno:Cut", "", 0, Array())
' --- Spalte einfügen
Args2(0).Name = "ToPoint"
Args2(0).Value = "$J$1"
Dispatcher.executeDispatch (Document, ".uno:GoToCell", "", 0, Args2())
dispatcher.executeDispatch(document, ".uno:Paste", "", 0, Array())
-------------------------------------------------------
Alex