--- On Mon, 5/6/13, Andrew Douglas
On 05/06/2013 05:21 AM, Vieri wrote:
I have an odt writer document with 2 input text
(added with the form designer toolbar). I manually type
into one of the fields. I copy/pasted a macro to see if
could grab the text within the input field but haven't
any luck. This is the test macro in Basic:
If Not IsNull(vEnum) Then
If vEnum.hasMoreElements() Then
Print "NOT OK"
If I manually run this macro I get the "NOT OK"
What am I doing wrong?
What is the correct way of getting the text field
I grabbed these two routines from my test modules
running them first....
Thanks for the reply but I'm still having trouble.
I'm either way off-course, misusing LO or making a dumb
I copied your macros to my odt document.
I then did a "tools, macros, run macro..." and selected the
Subs I copied.
If I run EnumerateTextFields then it yields the "Finished"
message box (nothing else).
If I run DisplayMasterFields then it yields the following
===Text Field Masters===
My odt document has 2 input fields in a form.
By the way, if I place a button within my form and configure
the "Mouse button pressed" to launch, say,
EnumerateTextFields then I get the following error message:
"LibreOffice 18.104.22.168 BASIC runtime error. '423'
getTextFields" and it points at the line:
"oEnum = oDoc.getTextFields().createEnumeration()"
I'm stuck on something that should be quite simple.
I'm attaching my odt file hoping that someone can tell me
what novice mistake I'm making.