openoffice-api mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hung Mark <>
Subject Set property of selected cell range in a textable in Writer
Date Wed, 08 Jul 2015 05:37:38 GMT
I'm not sure if I it is possible to make cell enumeration based on the
so that i can set property for each cell. Setting the property of a
CellRange seems not work.
Please advice, thank you.

Sub Snippet
  Dim oCurrentSelection As Variant
  Dim sRangeName As String
  Dim oCurrentController As Variant
  Dim oViewCursor As Variant
  Dim oTextTable As Variant
  Dim oCellRangeByName As Variant

  oCurrentSelection = ThisComponent.getCurrentSelection()
  sRangeName = oCurrentSelection.getRangeName()
  oCurrentController = ThisComponent.getCurrentController()

  oViewCursor = oCurrentController.getViewCursor()
  oTextTable = oViewCursor.TextTable
  oCellRangeByName = oTextTable.getCellRangeByName(sRangeName)

End Sub

Mark Hung

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message