OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Changing in 'Textfields' since OO Version 3.0

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
mri0202
General User
General User


Joined: 15 Sep 2008
Posts: 26

PostPosted: Wed Mar 04, 2009 2:45 am    Post subject: Changing in 'Textfields' since OO Version 3.0 Reply with quote

Hello,

I have to convert MSWord-Documents for use in OpenOffice.
These documents are containing textfields. To save the documents ind ODF-Format I had to fill the Textfields-DatabaseName and DatatableName otherwise plain text was saved instead of Textfields.

This routine was OK in Version 3.0.0 of OpenOffice. It doesn't function anymore in Version 3.0.1. No error occurs.

Code:

    Dim lWordDok As Object
    Dim xEnumeratedFields As Object
    Dim enumeration As Object
    Dim element As Object
    Dim lTextFeld As Object

    Set lWordDok = fOODesktop.getCurrentComponent()
       
    Set xEnumeratedFields = lWordDok.getTextFields()
    Set enumeration = xEnumeratedFields.createEnumeration()

    On Error Resume Next
    While (enumeration.hasMoreElements())
        Set element = enumeration.nextElement()
        If element.supportsService("com.sun.star.text.TextField.Database") Then
            Set lTextFeld = element.getTextFieldMaster()
            lTextFeld.DatabaseName = "XDATABASE"
            lTextFeld.DataTableName = "XTABLENAME"       
        End If
    Wend



Whats wrong?

Thanks for help

Regards

Manfred
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group