Ask Your Question

How to get title for Libre Writer from VB.NET

asked 2017-11-29 15:30:51 +0200

Muru gravatar image


I referred code from the below link and i try to get the document title from VB.NET. But i could not get the title for writer document. Can please any one tell how to get or set a title for Libre Writer document?


edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2017-11-29 16:17:12 +0200

Jim K gravatar image

There are two kinds of titles, the window title and the title shown in File -> Properties. The code below gets both.

Dim oSM, oDesk, oDoc As Object
Dim oFrame, oDocProps As Object
oSM = CreateObject("")
oDesk = oSM.createInstance("")
oDoc = oDesk.loadComponentFromURL("file:///path/to/document.odt", "_blank", 0, arg)
oFrame = oDoc.getCurrentController().getFrame()
oDocProps = oDoc.getDocumentProperties()

The document title is one of the attributes of XDocumentProperties.

edit flag offensive delete link more


Hi Jim, Thanks for the solution and its working well... :)

Muru gravatar imageMuru ( 2017-12-01 18:10:35 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2017-11-29 15:30:51 +0200

Seen: 203 times

Last updated: Nov 29 '17