My code is not working:
Code: Select all
Sub gettableproperty
oDoc = ThisComponent
for i = 0 to oDoc.getTextTables().Count() - 1
Dim oTab
Dim oVCurs
oDocumentView = oDoc.getCurrentController()
oTab = oDoc.getTextTables().getByIndex(i)
Tname = oTab.getName()
oDoc.getCurrentController().select(oTab)
oVCurs = oDoc.getCurrentController().getViewCursor()
oVCurs.goLeft(1, False)
sNames = oTab.getCellNames()
For j = LBound(sNames) To UBound(sNames)
oTab.getCellByName(sNames(j)).getString(sNames(j))
ocell = oTab.getCellByName(sNames(j))
oViewCursor = ThisComponent.CurrentController.ViewCursor
oViewCursor.gotoRange(ocell,false)
oViewCursor.goright(1,true)
oViewCursor.goleft(1,true)
oViewCursor.getPropertyValue("BackColor")
Next
Next
End Sub