![]() |
|
#10
|
|||
|
|||
|
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
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Macro to capitalize first letter after timecode + tab | muiy | Word VBA | 1 | 06-17-2015 11:03 PM |
Deleting a table from a content control -- preserving the content control
|
BrainSlugs83 | Word Tables | 8 | 11-14-2013 03:06 AM |
Only Capitalize First Letter & Delete Last Name
|
zulhfreelancer | Excel | 5 | 12-10-2012 07:51 AM |
| Exceptions for 'Capitalize first letter of sentences' | gazpacho | Word | 1 | 01-12-2012 11:43 AM |
| capitalize first letter of sentences | norco1 | Word | 0 | 06-25-2006 12:37 PM |