cbmarcum commented on pull request #104:
URL: https://github.com/apache/openoffice/pull/104#issuecomment-711047940
I'm not much of a Basic developer but I put this together as a test.
```
Sub Main
PR104()
End Sub
sub PR104
GlobalScope.BasicLibraries.loadLibrary("Tools")
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 productname As String
productname = Misc.GetProductName()
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "Text"
args1(0).Value = productname
dispatcher.executeDispatch(document, ".uno:InsertText", "", 0, args1())
end sub
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]