#1
|
|||
|
|||
Replace paragraph-marks (line-breaks) in tables with a character-string
I've got several documents that contain tables and am looking for a way to replace all the paragraph-markers (line-breaks) in all tables with a specified character-string. Any help will be greatly appreciated. |
#2
|
||||
|
||||
You could use code like:
Code:
Sub ProcessTables() Application.ScreenUpdating = False Dim Tbl As Table With ActiveDocument For Each Tbl In .Tables With Tbl.Range.Find .ClearFormatting .Replacement.ClearFormatting .Forward = True .Wrap = wdFindStop .Format = False .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False .Text = "^p" .Replacement.Text = "???" .Execute Replace:=wdReplaceAll End With Next End With Application.ScreenUpdating = True End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Thx Paul!!!
Exactly what i needed... I'm kinda new to vba and this looks like "the" place to pick up some tricks. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to delete all the punctuation marks from a paragraph? | Jamal NUMAN | Word | 3 | 02-26-2019 02:33 PM |
Find and replace a string of text | errtu | Word | 1 | 01-31-2013 02:09 PM |
Bad view when using Find and Find & Replace - Word places found string on top line | paulkaye | Word | 4 | 12-06-2011 11:05 PM |
Paragraph line breaks | muymalestado | Word | 3 | 09-25-2011 05:06 AM |
Hide paragraph format marks | Cara | Word | 2 | 04-07-2011 10:26 AM |