macros - get selected cell in table powerpoint 2007 vb.net -
i need selected cells of table.
i tried following code
set otbl = .shaperange(1).table x = 1 otbl.rows.count y = 1 otbl.columns.count if otbl.cell(x, y).selected otbl.cell(x, y).shape .fill.forecolor.rgb = rgb(255, 0, 0) .fill.visible = true end end if next next
this works fine if using vba, im creating vsto using vb.net , colors complete table using below code
dim oshape powerpoint.shape = nothing dim otable powerpoint.table globals.thisaddin.application.activewindow.selection each oshape in .shaperange oshape.select() exit next otable = oshape.table dim integer = 0 dim j integer = 0 = 1 otable.rows.count j = 1 otable.columns.count if otable.cell(i, j).selected = true otable.cell(i, j).shape .fill.forecolor.rgb = rgb(255, 0, 0) .fill.visible = microsoft.office.core.msotristate.msotrue end end if next next end
please help
thanks
leroy m
this works in vba; don't use .net can't that.
sub tabletest() dim osh shape dim otbl table dim lrow long ' dim lcol long ' j set osh = activewindow.selection.shaperange(1) set otbl = osh.table otbl lrow = 1 .rows.count lcol = 1 .columns.count if .cell(lrow, lcol).selected .cell(lrow, lcol).shape .fill.forecolor.rgb = rgb(255, 0, 0) .fill.visible = true end end if next next end end sub
Comments
Post a Comment