Class DropCap (Word VBA)
The class DropCap represents a dropped capital letter at the beginning of a paragraph. There is no DropCaps collection; each Paragraph object contains only one DropCap object. To use a DropCap class variable it first needs to be instantiated, for example
Dim dcp as DropCap
Set dcp = ActiveDocument.Paragraphs(1).DropCap
Clear
Removes the dropped capital letter formatting.
Set drop = ActiveDocument.Paragraphs(1).DropCap
If Not (drop Is Nothing) Then drop.Clear
DistanceFromText
Returns or sets a Single that represents the distance (in points) between the dropped capital letter and the paragraph text.
With ActiveDocument.Paragraphs(1).DropCap
.Enable
.FontName= "Arial"
.Position = wdDropNormal
.DistanceFromText = 12
End With
Enable
Formats the first character in the specified paragraph as a dropped capital letter.
With Selection.Paragraphs(1).DropCap
.Enable
.LinesToDrop = 2
.FontName = "Arial"
End With
FontName
Returns or sets a String that represents the name of the font for the dropped capital letter.
With ActiveDocument.Paragraphs(1).DropCap
.FontName = "Arial"
.Position = wdDropNormal
.LinesToDrop = 3
.DistanceFromText = InchesToPoints(0.1)
End With
LinesToDrop
Returns or sets the height (in lines) of the specified dropped capital letter.
With ActiveDocument.Paragraphs(1).DropCap
.Enable
.Position = wdDropNormal
.LinesToDrop = 3
End With
Position
Returns or sets the position of a dropped capital letter. Possible return values are wdDropMargin - Dropped capital letter ends at the left margin, wdDropNone - No dropped capital letter, wdDropNormal - Dropped capital letter begins at the left margin.
With ActiveDocument.Paragraphs(1).DropCap
.Enable
.FontName= "Arial"
.Position = wdDropNormal
End With