Microsoft Office Forums Adding bold colons at end of bold row headings

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-25-2015, 12:01 PM
bertietheblue bertietheblue is offline Adding bold colons at end of bold row headings Windows 7 64bit Adding bold colons at end of bold row headings Office 2003
Advanced Beginner
Adding bold colons at end of bold row headings
 
Join Date: May 2012
Location: United Kingdom
Posts: 45
bertietheblue is on a distinguished road
Default Adding bold colons at end of bold row headings

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
Reply With Quote
  #2  
Old 07-25-2015, 02:47 PM
macropod's Avatar
macropod macropod is offline Adding bold colons at end of bold row headings Windows 7 64bit Adding bold colons at end of bold row headings Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 19,657
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

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
[MS MVP - Word]
Reply With Quote
  #3  
Old 07-26-2015, 07:26 AM
bertietheblue bertietheblue is offline Adding bold colons at end of bold row headings Windows 7 64bit Adding bold colons at end of bold row headings Office 2003
Advanced Beginner
Adding bold colons at end of bold row headings
 
Join Date: May 2012
Location: United Kingdom
Posts: 45
bertietheblue is on a distinguished road
Default

Thanks as always, macropod!
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding bold colons at end of bold row headings 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
Adding bold colons at end of bold row headings Problem with bold numbers in multi-level list styles when having numbered headings AND paragraphs bwofficer Word 2 12-12-2014 12:21 AM
Adding bold colons at end of bold row headings 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


All times are GMT -7. The time now is 06:05 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2019 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft