View Single Post
 
Old 06-14-2023, 02:05 PM
gmaxey gmaxey is offline Windows 10 Office 2019
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,602
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

Code:
Sub ApplyDropCapOptions()
'To clear all
Dim lngPar As Long
Dim oPar As Paragraph
Dim dropCap As dropCap
  For lngPar = ActiveDocument.Paragraphs.Count To 1 Step -1
    Set oPar = ActiveDocument.Paragraphs(lngPar)
    If Len(oPar.Range.Text) > 1 Then
      With oPar.dropCap
        If .Position <> wdDropNone Then
          .Clear
        End If
      End With
    End If
  Next lngPar
End Sub

Sub ApplyDropCapOptionsII()
'To set all applied drop caps to 2
Dim lngPar As Long
Dim oPar As Paragraph
Dim dropCap As dropCap
  For lngPar = ActiveDocument.Paragraphs.Count To 1 Step -1
    Set oPar = ActiveDocument.Paragraphs(lngPar)
    If Len(oPar.Range.Text) > 1 Then
      With oPar.dropCap
        If .Position <> wdDropNone Then
          .LinesToDrop = 2
        End If
      End With
    End If
  Next lngPar
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote