I tried to record a macro to sort my writer document (by paragraphs), but the recorder stops when the sort dialog opens.
So what command do I need to use to simply sort paragraphs?
I am writing in OOo BASIC.
(Doing a search for other posts brings up every sort of topic, it is sort of disappointing. Do you sort of see what I mean?)
Harvey
Macro to sort paragraphs
Macro to sort paragraphs
Harvey (harveyab)
OOo 3.3.0 on MS Windows XP --- Time drags so quickly.
OOo 3.3.0 on MS Windows XP --- Time drags so quickly.
Re: Macro to sort paragraphs
Run this and confirm that you really want to do that by hitting the Enter key.
Code: Select all
sub recorded_SelectAll_Sort
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 ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:SelectAll", "", 0, Array())
rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:SortDialog", "", 0, Array())
end sub
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice