![]() |
|
#4
|
||||
|
||||
|
The following should work
Code:
Sub Macro1()
Dim oRng As Range
On Error GoTo lbl_Exit
Set oRng = ActiveDocument.Range
With oRng.Find
.Wrap = wdFindStop
Do While .Execute(FindText:="^13")
If Not oRng.ParagraphFormat.Alignment = wdAlignParagraphCenter Then
oRng.ParagraphFormat.Alignment = wdAlignParagraphJustify
End If
Loop
End With
lbl_Exit:
Exit Sub
err_Handler:
Err.Clear
GoTo lbl_Exit
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Footnote extraction macro [Why is this macro so slow? / anyway to make it faster?]
|
Le_Blanc | Word VBA | 10 | 03-22-2021 11:38 AM |
| Spell check macro within macro button field doesn't work in one document | samuelle | Word VBA | 0 | 07-20-2016 02:27 AM |
Macro Question: Need help making a macro to highlight the first word in every sentence
|
LadyAna | Word | 1 | 12-06-2014 10:39 PM |
| Macro Needed to bold specific lines and Macro to turn into CSV | anewteacher | Word VBA | 1 | 05-28-2014 03:59 PM |
| custom icon, undo/redo for macro, permanent macro | Rapier | Excel | 0 | 08-05-2013 06:30 AM |