I've updated the page from where you've picked up this snippet to show you
can extend it to locate the position within a table.
http://skp.mvps.org/ppt00041.htm
--
Regards,
Shyam Pillai
Handout Wizard:
http://skp.mvps.org/how. PowerPoint 2010 (32-bit/64-bit)
versions supported.
"doodleM" <(E-Mail Removed)> wrote in message
news:B41464CC-1EC0-4089-BA73-(E-Mail Removed)...
> How to determine the current cursor position in the selection of a Table
> cell
> in Powerpoint 2007 using vb.net
>
> If the selection type is text, then the
> ActiveWindow.Selection.TextRange.Start property returns the current
> position
> at which the selection begins within the parent text range. In this
> snippet
> we try to determine within which paragraph in the text range does the
> cursor
> selection begin.
>
>
> Sub CurrentTextSelectionParaPosition()
> Dim oShp As Shape
> If ActiveWindow.Selection.Type = ppSelectionText Then
> Set oShp = ActiveWindow.Selection.ShapeRange.Item(1)
> With ActiveWindow.Selection.TextRange
> For I = 1 To oShp.TextFrame.TextRange.Paragraphs.Count
> If oShp.TextFrame.TextRange.Paragraphs(I).Start +
> .TextFrame.TextRange _
> .Paragraphs(I).Length > .Start Then
> MsgBox "Current selection begins in paragraph number: " & I
> Exit For
> End If
> Next I
> End With
> End If
> End Sub
>
>
> But this is not working when I select the cell of a Table in Powerpoint
> Slide for this I am using :
>
> ActiveWindow.Selection.ShapeRange.Table.Cell(rowIndex, colIndex).Selected
> =
> True ActiveWindow.Selection.ShapeRange.Table.Cell(rowIndex,
> colIndex).Shape.TextFrame.TextRange
>
> It always gives me the entire paragraphs text of a cell.
>
>
> Kindly help, any pointers will be appreciated
>
> Thanks,
> doodle
>