What is the equivalent of "^p" in tables ?

J

John Svendsen

Hi All,

I need to delete blank characters at the end of text in tables.
To do this in normal text (non-table) all I do is replace " ^p" (blank
before ^p) with "^p", but I cannot find the equivalent of ^p for tables
(that circle with 4 dots) - is this something easy, that I'm simply missing
?!?
Tks, JS
 
A

Al

Hi All,

I need to delete blank characters at the end of text in tables.
To do this in normal text (non-table) all I do is replace " ^p" (blank
before ^p) with "^p", but I cannot find the equivalent of ^p for
tables (that circle with 4 dots) - is this something easy, that I'm
simply missing ?!?
Tks, JS
This will delete the blank line at the end of all cells.


Sub TableCellLast()
'
' TableCellLast Macro
'
'
Dim tableLoop As Table
Dim cellLoop As Cell
For Each tableLoop In ActiveDocument.Tables
For Each cellLoop In tableLoop.Range.Cells
While Right(cellLoop.Range.Text, 3) = Chr(13) & Chr(13) & Chr(7)
cellLoop.Range.Characters.Last.Previous.Delete
Wend
Next cellLoop
Next tableLoop
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top