Ask Your Question

Unable to fill a bookmark in libreoffice Writer

asked 2017-11-23 14:51:07 +0200

tucutu gravatar image

Hi, I have libreoffice 5.3 and I am programming in PowerBuilder 10.5. The problem is that It not recognize the getByName ("<marker>") with which I try to access the bookmarker in Writer. Has anyone succeeded? I guess the writer's version is indifferent.

-The error he gives is: Name not found calling external object funtion getbyname.

-The code I use is the following:



iole_objDeskTop = iole_serviceManager.createInstance("")


iole_objDocumento = iole_objDeskTop.loadComponentFromURL("file:///" + as_ruta, '_blank', 0, iole_propertyValue[]) ...

obookmark = iole_objDocumento.Bookmarks.getByNamex("MARCADOR1")

Does anyone have any idea that where I may be failing? Thank you very much in advance for your time reading me.

edit retag flag offensive close merge delete


The code says getByNamex, but the error message says getbyname. Are you sure this error comes from this code?

Jim K gravatar imageJim K ( 2017-11-23 16:53:46 +0200 )edit

Yes sorry, that was a try I made before post here. The original code is getByName. After debuging I'm sure the error come from that line. Thanks for your answer.

tucutu gravatar imagetucutu ( 2017-11-24 08:23:58 +0200 )edit

1 Answer

Sort by » oldest newest most voted

answered 2017-11-24 12:30:03 +0200

tucutu gravatar image


string elementName[] elementName = iole_objDocumento.Bookmarks.getElementNames()

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2017-11-23 14:51:07 +0200

Seen: 41 times

Last updated: Nov 24 '17