I'm trying to create a rudimentary glossary macro for a LibreOffice/OpenOffice .odt file. It will go to the end of the document and paste a list of selected words(found by regex) as a unique set (no doubles)
Where I'm falling down is that once the text has been copied to the clipboard, I need to assign the contents to a variable so that I can create a set.
In OpenOffice's implementation of BASIC, how does one assign the contents of the clipboard to a new variable?
To be clear: I don't need the Paste function, I need to manipulate the contents of the clipboard as an Object before calling Paste
A rough draft of what I'm trying to do is:
dispatcher.executeDispatch(document, ".uno:Copy", "", 0, Array())
rem -------------- PROBLEM IS BELOW -------
Dim oModuleUICommandDescription As Object, myText$(),aCommand
myText = thisComponent.currentSelection(0)
rem -------------- PROBLEM IS ABOVE -------
rem -------------- Followed by an array comparison to get a unique set
i = FreeFile()
Open "/path/to/my/BASIC.txt" For Output As i
Print #i, myText.string
Close #i