![]() |
#1
|
|||
|
|||
![]()
Within a table, I have a column that has multiple paragraphs in each cell. Some cells may have 1 paragraph - others may have up to 5.
I want to delete all of the blank spaces & lines at the end of the last paragraph in the cell so the table cell is as small as possible. The number of blank spaces and lines are inconsistent --- some cells many have none - some may have 1 blank line - some may have many. ![]() Thanks for your help! |
#2
|
||||
|
||||
![]()
You could use a sequence of wildcard Find/Replaces, where:
Find = [ ]{2,} Replace = ^32 Find = [ ^13]{1,} Replace = ^p Find = [^13]{1,} Replace = ^p This will reduce all repeated space & paragraph sequences to one of each, then reduce and combined paragraph/space sequences to just a paragraph break. At worst, you'll be left with cells that have a unnecessary paragraph break in the last paragraph before the end-of-cell marker. No need for VBA, though you could record the above as a macro. What's not clear, anyway, is what you'd want to do vis-à-vis paragraph beaks and end-of-cell markers.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
![]()
The challenge is - I don't want to delete the blank lines between the "real" paragraphs. For example:
Paragraph 1................................. Paragraph 2................................ Paragraph 3........................... (I want to delete everything after paragraph 3) The table is actually built by PowerPoint through the "Publish to Word" function. I have a macro that swaps out the slide pictures and reformats the tabel, etc. The problem is with the notes from PPT. Many times there are several blank lines in the table cell and it causes the entire cell to be too large. So I want to eliminate the blank lines. I know this is a difficult one to try and fix because search and replace won't work and because I don't want to delete the blank lines that should exist. Thoughts???? |
#4
|
||||
|
||||
![]()
Did you actually try the Find/Replace? You also mention using a macro for transferring the notes from PowerPoint. In that case, you really should be cleaning the data as part of the transfer process (e.g. via Trim).
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
So New2 This | Word VBA | 1 | 05-06-2013 09:00 PM |
![]() |
ramsgarla | Word VBA | 1 | 10-29-2012 12:26 AM |
![]() |
lukester | Word Tables | 3 | 07-11-2012 07:01 AM |
![]() |
tinfanide | Word VBA | 3 | 04-27-2012 09:48 AM |
Text Wrapping on Fixed Lines in a Form field/Table cell | okrmjr | Word Tables | 0 | 10-30-2009 08:52 AM |