View Single Post
 
Old 06-08-2016, 10:27 AM
gmaxey gmaxey is offline Windows 7 32bit Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,601
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

Some people may feel an error statement like that is indiscriminate use of brute force.

Another way to handle that issue is check to ensure the CC is not showing placeholder text.

While it probably doesn't matter in your case, if you had a shape or something anchored in the a rich text control that code my delete the shape.

You could also try:

Code:
Private Sub Document_ContentControlOnExit(ByVal CCtrl As ContentControl, Cancel As Boolean)
With CCtrl
  Select Case .Type
    Case wdContentControlText, wdContentControlRichText, wdContentControlComboBox
      If Not CCtrl.ShowingPlaceholderText Then
        .Range.Case = wdTitleSentence
      End If
    Case Else
  End Select
End With
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote