S
Stephen English
When a user places the cursor at any point in a cell in a table,
I am trying to select all the text within the cell and then indent it. The
text can have list numbers and list bullets within it.
My code is below but it is indenting the whole row of the table.
I tried recording a macro but I can't get the bit about selecting the text
in the cell from that.
Thanks
Stephen
Sub IndentCellText()
Dim CurrentRow As Integer
Dim CurrentColumn As Integer
If Selection.Information(wdWithInTable) = True Then
CurrentRow = Selection.Information(wdStartOfRangeRowNumber)
CurrentColumn = Selection.Information(wdStartOfRangeColumnNumber)
Selection.Tables(1).Cell(CurrentRow, CurrentColumn).Select
Selection.i
Selection.Paragraphs.Indent
End If
End Sub
I am trying to select all the text within the cell and then indent it. The
text can have list numbers and list bullets within it.
My code is below but it is indenting the whole row of the table.
I tried recording a macro but I can't get the bit about selecting the text
in the cell from that.
Thanks
Stephen
Sub IndentCellText()
Dim CurrentRow As Integer
Dim CurrentColumn As Integer
If Selection.Information(wdWithInTable) = True Then
CurrentRow = Selection.Information(wdStartOfRangeRowNumber)
CurrentColumn = Selection.Information(wdStartOfRangeColumnNumber)
Selection.Tables(1).Cell(CurrentRow, CurrentColumn).Select
Selection.i
Selection.Paragraphs.Indent
End If
End Sub