<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_UNCONFIRMED "
title="UNCONFIRMED - Unable to modify TablecolumnSeparator in Writer using VB OOO"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=127042">127042</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Unable to modify TablecolumnSeparator in Writer using VB OOO
</td>
</tr>
<tr>
<th>Product</th>
<td>LibreOffice
</td>
</tr>
<tr>
<th>Version</th>
<td>6.3.0.4 release
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows (All)
</td>
</tr>
<tr>
<th>Status</th>
<td>UNCONFIRMED
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>Writer
</td>
</tr>
<tr>
<th>Assignee</th>
<td>libreoffice-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>didier.laroche@hotmail.com
</td>
</tr></table>
<p>
<div>
<pre>Description:
Hello,
I am using VBA (from MS Access) to generate writer documnet.
When dealing with tables, i am unable to modify the TableColumnSepartor
property from VB OOO. Same functionality implemented as a Macro in the writer
document is working. (document is attached)
My VB ooo code:
Sub ResizeColumnTable()
Dim oSM 'Root object for accessing OpenOffice from VB
Dim oDesk, oDoc As Object 'First objects from the API
Dim arg()
'Instantiate OOo
Set oSM = CreateObject("com.sun.star.ServiceManager")
' Create the first and most important service
Set oDesk = oSM.CreateInstance("com.sun.star.frame.Desktop")
' file must be full access to the file to be uploaded
Set oDoc =
oDesk.loadComponentFromURL("file:///c:/.../bugColumnSeparator.odt", "_blank",
0, arg())
' ++++++++++++++++++++++++++ table management ++++++++++++++
Dim oRepTables As Object
Set oRepTables = oDoc.getTextTables
Dim oTableRep As Object
Set oTableRep = oRepTables.GetByName("tbl_table1")
' modify table column separator
Dim objColumnSeparator As Object
objColumnSeparator = oTableRep.GetPropertyValue("TableColumnSeparators")
objColumnSeparator(0).Position = 1000
objColumnSeparator(1).Position = 2000
objColumnSeparator(2).Position = 3000
objColumnSeparator(2).Position = 4000
oTableRep.SetPropertyValue "TableColumnSeparators", objColumnSeparator
'Save the document as a new document
Call oDoc.storeToURL("file:///c:/...../bugColumnSeparatorUpdated.odt",
arg())
'Close the document
oDoc.Close (True)
Set oDoc = Nothing
End Sub
I have attached the writer document that contains the same functionality
developped as a macro (main)
Steps to Reproduce:
1.run the VB code provided in the description
2.file will not have the column sized modified
3.running macro in the writer document make it work
Actual Results:
table columns are not changed in size
Expected Results:
table column sized changed (same as the main macro in the attached document)
Reproducible: Always
User Profile Reset: Yes
Additional Info:
Sub ResizeColumnTable()
Dim oSM 'Root object for accessing OpenOffice from VB
Dim oDesk, oDoc As Object 'First objects from the API
Dim arg()
'Instantiate OOo
Set oSM = CreateObject("com.sun.star.ServiceManager")
' Create the first and most important service
Set oDesk = oSM.CreateInstance("com.sun.star.frame.Desktop")
' file must be full access to the file to be uploaded
Set oDoc =
oDesk.loadComponentFromURL("file:///c:/.../bugColumnSeparator.odt", "_blank",
0, arg())
' ++++++++++++++++++++++++++ table management ++++++++++++++
Dim oRepTables As Object
Set oRepTables = oDoc.getTextTables
Dim oTableRep As Object
Set oTableRep = oRepTables.GetByName("tbl_table1")
' modify table column separator
Dim objColumnSeparator As Object
objColumnSeparator = oTableRep.GetPropertyValue("TableColumnSeparators")
objColumnSeparator(0).Position = 1000
objColumnSeparator(1).Position = 2000
objColumnSeparator(2).Position = 3000
objColumnSeparator(2).Position = 4000
oTableRep.SetPropertyValue "TableColumnSeparators", objColumnSeparator
'Save the document as a new document
Call oDoc.storeToURL("file:///c:/...../bugColumnSeparatorUpdated.odt",
arg())
'Close the document
oDoc.Close (True)
Set oDoc = Nothing
End Sub</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>