Remove all DropCap

G

Graham Mayor

If the dropcaps have been inserted with the DropCap function, then

Sub RemoveDropCaps()
Dim oRng As Range
On Error Resume Next
For i = 1 To ActiveDocument.Paragraphs.Count
Set oRng = ActiveDocument.Paragraphs(i).Range
With oRng.Paragraphs(1).DropCap
.Position = wdDropNone
End With
Next i
End Sub

will remove them

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
P

Provart

Graham Mayor said:
If the dropcaps have been inserted with the DropCap function, then

Sub RemoveDropCaps()
Dim oRng As Range
On Error Resume Next
For i = 1 To ActiveDocument.Paragraphs.Count
Set oRng = ActiveDocument.Paragraphs(i).Range
With oRng.Paragraphs(1).DropCap
.Position = wdDropNone
End With
Next i
End Sub

will remove them
I tried your VBA code, but Word hangs and I apparently can replace just
the first capolettera.
Thanks for the valuable help.
 
P

Provart

I wrote this code:

Sub RemoveDropCaps()
Do
Selection.Next(Unit:=wdParagraph, Count:=1).Select
ì = ActiveDocument.Paragraphs.Count
openquote = InStr(1, i)
With Selection.Paragraphs(1).DropCap
.Position = wdDropNone
End With
Loop
End Sub

But it is really too slow to scroll through a document we make a life.
will be my slow computer, but also often by mistake, you can not do any
better?
 
P

Provart

It's Code is good:

Sub RemoveDropCaps()
For Each aFrame In ActiveDocument.Frames
aFrame.Select
With Selection.Paragraphs(1).DropCap
.Position = wdDropNone
End With
Next aFrame
End Sub

Tnx all
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top