![]() |
|
#1
|
|||
|
|||
|
Hi
I wanted the bold row headings in my Word table (of which there are over 1,000), to end in a bold colon. Bold text is not used in the other columns, so: Find: [any bold][end of cell marker] Replace with [any bold][bold colon][end of cell marker] I cannot locate a code for end of cell markers, so has anybody any idea how to do this? Thanks Bertie |
|
#2
|
||||
|
||||
|
There is no Find/Replace expression to do that. A Find expression can't look for an end of cell marker. A macro would be required. For example:
Code:
Sub Demo()
Application.ScreenUpdating = False
With ActiveDocument.Range
With .Find
.ClearFormatting
.Replacement.ClearFormatting
.Text = ""
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindStop
.Format = True
.Font.Bold = True
.Execute
End With
Do While .Find.Found
If .Information(wdWithInTable) = True Then
If .End = .Cells(1).Range.End - 1 Then
If .Characters.Last.Text <> ":" Then .InsertAfter ":"
.End = .Cells(1).Range.End
End If
End If
.Collapse wdCollapseEnd
.Find.Execute
Loop
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
#3
|
|||
|
|||
|
Thanks as always, macropod!
|
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Text in #1 is made bold, rest of the document is edited, text in #1 is now not bold
|
footer-assistance | Word | 1 | 06-29-2015 03:49 AM |
Problem with bold numbers in multi-level list styles when having numbered headings AND paragraphs
|
bwofficer | Word | 2 | 12-12-2014 12:21 AM |
Not Bold text but it comes up bold
|
Pluviophile | Word | 7 | 10-22-2013 10:29 AM |
| Format Bold in one line makes all lines bold | Nitte | Word | 2 | 02-07-2013 12:34 AM |
| Can't use Bold and Italic | khmerguy | Word | 3 | 03-31-2011 12:48 PM |