View Single Post
 
Old 06-15-2016, 11:34 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2013
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,159
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

It is poor practice to use a pair of soft returns instead of a single return. The coding for each (real) paragraph would be much easier too.
Code:
Private Sub Document_ContentControlOnExit(ByVal CCtrl As ContentControl, Cancel As Boolean)
  Dim aPara As Paragraph
  With CCtrl
    Select Case .Type
      Case wdContentControlText, wdContentControlRichText, wdContentControlComboBox
        On Error Resume Next
        For Each aPara In .Range.Paragraphs
          aPara.Range.Characters.First = UCase(aPara.Range.Characters.First)
        Next aPara
        Case Else
    End Select
  End With
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote