mri0202 General User

Joined: 15 Sep 2008 Posts: 26
|
Posted: Wed Mar 04, 2009 2:45 am Post subject: Changing in 'Textfields' since OO Version 3.0 |
|
|
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 |
|