View Single Post
 
Old 03-19-2022, 03:43 AM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2019
Expert
 
Join Date: Aug 2014
Posts: 4,144
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

Change the first part to
Code:
Sub ChangeCaseTagged()
Dim oPara As Paragraph
Dim oRng As Range
    For Each oPara In ActiveDocument.Range.Paragraphs
        Set oRng = oPara.Range
        oRng.End = oRng.End - 1
        If oRng.Text Like "<S*>*" Or _
           oRng.Text Like "<FG>*" Or _
           oRng.Text Like "<TC>*" Then
            If Len(oRng.Text) > 0 _
               Then TrueTitleCase oRng
        End If
    Next oPara
lbl_Exit:
    Set oPara = Nothing
    Set oRng = Nothing
    Exit Sub
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote