I've recreated and saved the macro 10 times, and don't get any error messages. However, every time I choose Tools-Macro-Run Macro, select the macro and click the Run button, nothing happens. No error messages appear, but the column remains unsorted.
Here's the macro content (all auto-generated, I haven't done any manual editing):
Code: Select all
REM ***** BASIC *****
sub Sort_by_Google_Hits
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(6) as new com.sun.star.beans.PropertyValue
args1(0).Name = "ByRows"
args1(0).Value = true
args1(1).Name = "HasHeader"
args1(1).Value = false
args1(2).Name = "CaseSensitive"
args1(2).Value = false
args1(3).Name = "IncludeAttribs"
args1(3).Value = true
args1(4).Name = "UserDefIndex"
args1(4).Value = 0
args1(5).Name = "Col1"
args1(5).Value = 3
args1(6).Name = "Ascending1"
args1(6).Value = false
dispatcher.executeDispatch(document, ".uno:DataSort", "", 0, args1())
end sub