Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index




--- On Thu, 5/9/13, mcmurchy1917-libreoffice@yahoo.co.uk <mcmurchy1917-libreoffice@yahoo.co.uk> 
wrote:

Hi Vieri

The form you've created contains a set of controls of which
one or more of 
them are of the "Text box" variety. 


You may also have other controls on the form such as a
"Check Box", "Label" or 
"Push Button" these latter controls don't have the ability
to hold text or 
edit text so don't have the .Text property. So for these
controls the code 
x.Text will fail.


Try this

Sub EnumerateFields

    oDoc = ThisComponent
    oDrawPage = oDoc.DrawPage
    oForm = oDrawPage.Forms.GetByIndex(0)
      For i = 0 To oForm.getCount()-1
         x =
oForm.getByIndex(i)
         if
x.supportsService("com.sun.star.form.component.TextField")
then
     
          
Print x.getName() & " : " & x.Text
     
       End If
      Next
  
End Sub

Thanks Iain.
Your help is much appreciated. The macro works.
Now I'm trying to send HTTPS POST requests to my web server (not succeeding but that's another 
story).

Thanks again!

Vieri



-- 
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.