Python libreoffice writer5/31/2023 ![]() ![]() This is the line of code that contain the problem sSelectedText = ThisComponent. ![]() OScriptProc.invoke( ":file:///C.main.py$main", args(), Array(), Array() )Ĭan someone help me with the documentation or provide an answer on how to retrieve the selected text from the document object? I would greatly appreciate any guidance or resources that could help me resolve this issue. OScriptProc = createUnoService(".provider.ScriptProviderForPython") If you don't have Word, LibreOffice Writer and OpenOffice Writer are both free alternative applications for Windows, OS X. SSelectedText = ThisComponent.getSelectedText()ĭim args(0) As new .PropertyValue I've been using a macro provided by ChatGPT, but I'm currently facing an issue with the function used to retrieve the selected text from the document object: sub SendSelectedTextToPythonScript > I get an error No SSL support included in this Python in 4.2 Libre > Office. There are two types of formatting that we can apply. On Thu, at 09:54 +0600, Agapov Ruslan wrote: > Hi. For more information on library containers, visit LibreOffice Application Programming Interface (API) or download LibreOffice Software Development Kit (SDK). To achieve this, I want to be able to select text in the document and then use a button to send that text to the script. LibreOffice Writer A word processor is a software for typing, formatting and creating documents. Similarly to LibreOffice Basic that supports browsing and dynamic loading of libraries, Python libraries can be explored and imported on demand. My goal is to create a macro that sends selected text in a document to a Python script. Hello everyone, it's my first time developing a macro in LibreOffice. ![]()
0 Comments
Leave a Reply. |