![]() |
|
#1
|
|||
|
|||
|
I have a macro that converts the first letter of the first word of each section to Drop Caps. However I would like some help editing the macro so that it will convert the whole first word to Drop Caps, rather than just the first letter. The space after the first word also needs to be deleted in order to keep the left alignment.
I have attached images showing a document before running the macro, after running the macro, and what I want the new macro to do. Code:
Sub DropCaps()
Dim oSection As Section
Dim i As Integer
For Each oSection In ActiveDocument.Sections
For i = 1 To oSection.Range.Paragraphs.Count
If Len(oSection.Range.Paragraphs(i).Range) > 1 Then
Exit For
End If
Next i
With oSection.Range.Paragraphs(i).DropCap
.Position = wdDropNormal
.LinesToDrop = 2
.DistanceFromText = CentimetersToPoints(0.1)
End With
Next oSection
Set oSection = Nothing
End Sub
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Powerpoint-2019 Text in selected theme remains in All Caps even when small caps option is selected | Tanasha4 | PowerPoint | 2 | 04-06-2019 07:53 PM |
Word macro to change ALL CAPS to UPPERCASE
|
dita | Word VBA | 14 | 05-20-2018 10:56 PM |
Need a Macro to Change Every Instance of Small Caps to All Caps and Reduce the Font by 2 Points
|
CrossReach | Word VBA | 2 | 11-13-2017 09:21 AM |
Drop Caps Problem
|
dustnik | Word | 5 | 12-12-2016 01:14 PM |
| Multiple drop caps | Ziggy-R | Publisher | 0 | 10-26-2010 06:23 PM |