View Single Post
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Paragraph alignment in a macro

Dim i As Long

With ActiveDocument
For i = .Paragraphs.Count To 1 Step -1
If .Paragraphs(i).Alignment = wdAlignParagraphCenter Then
.Paragraphs(i).Range.Delete
End If
Next i
End With


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"jezzica85" wrote in message
...
Hi everybody,
I'm trying to write a macro, and one of the first steps I want is to
delete
any text that is center-aligned. I tried to record a macro, using the find
and replace, but then when I ran the macro I couldn't make it work. I
don't
know much about writing macro code, does anybody know how to put this into
a
macro? I only need a little snippet of code, if you can.
Thanks!
jezzica85