I can't figure out how to access text fields within an existing .odt file that I have created previously.
Im using VBScript and I HAVE to use it, other languages are no option. This script is supposed to be integrated as a module withini another application later.
this is what I got so far:
Code: Select all
Set objDesktop = objServiceManager.CreateInstance("com.sun.star.frame.Desktop")
Dim args(0) : Set args(0) = OO_setPropVal("Hidden", true)
Dim objDoc : Set objDoc = objDesktop.loadComponentFromURL("file:///C:/Users/RVama/Desktop/Test_1.odt", "_blank", 0, args)
Dim textFields : Set textFields = objDoc.getTextFields()
Code: Select all
MsgBox textFields.getElementType()
If I get this right, this is the type of the elements WITHIN textFields, not the type of textFields itself, right? 'textFields' is supposed to be a XEnumerationAccess object according to the OOo API documentation (http://www.openoffice.org/api/docs/comm ... plier.html - method "getTextFields").
I read this guide: https://wiki.openoffice.org/wiki/Docume ... ext_Fields
but I still don't know how to access the individual text fields. It can't be that hard, but I don't get it :/
Thank you in advance.