Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Hi

I would do something like this:

option explicit

sub PysSelectCol

dim oDoc as object, oTable as object, oCell as object
dim oCursor as object, oFrame as object, oDispatcher as object

oDoc = ThisComponent

oTable = oDoc.getTextTables.GetByIndex(0)
oCell = oTable.getCellByName("D1")

oCursor = oCell.createTextCursor
oDoc.currentController.Select(oCursor)
oFrame = oDoc.CurrentController.Frame

oDispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
oDispatcher.executeDispatch(oFrame, ".uno:EntireColumn", "", 0, Array())

end sub

See

Regards