View Single Post
 
Old 01-07-2012, 11:25 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi frondeur,

You can't make this something that automatically occurs in the background as part of the captioning. Try:
Code:
Sub CaptionBold()
Application.ScreenUpdating = False
Dim RngCap As Range
With ActiveDocument
  On Error Resume Next
  .Styles.Add "CaptionLabel", wdStyleTypeCharacter
  On Error GoTo 0
  .Styles("CaptionLabel").Font.Bold = True
  .Styles("Caption").Font.Bold = False
  With .Range
    With .Find
      .ClearFormatting
      .Text = ""
      .Style = "Caption"
      .Replacement.Text = ""
      .Forward = True
      .Wrap = wdFindStop
      .Format = True
      .Execute
    End With
    Do While .Find.Found
      Set RngCap = .Paragraphs.Last.Range.Duplicate
      With RngCap
        .End = .Start + Len(Split(.Text, " ")(0)) + 1
        .MoveEndUntil " ", wdForward
        .Style = "CaptionLabel"
      End With
      .Collapse wdCollapseEnd
      .Find.Execute
    Loop
  End With
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote