![]() |
|
#2
|
||||
|
||||
|
Stage one macro might work along these lines
Code:
Sub DamnBrackets()
Dim aPar As Paragraph, aRng As Range
For Each aPar In ActiveDocument.Paragraphs
If aPar.Style = "Normal" Then
Set aRng = aPar.Range
Do While Left(aRng.Text, 1) = " "
aRng.MoveStart Unit:=wdCharacter, Count:=1
Loop
Do While Right(aRng.Text, 1) = vbCr Or Right(aRng.Text, 1) = " "
aRng.MoveEnd Unit:=wdCharacter, Count:=-1
Loop
If Len(aRng.Text) > 0 Then
aRng.InsertAfter ")"
aRng.InsertBefore "("
End If
End If
Next aPar
End Sub
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
find and delet all text within brackets and the brackets themselves
|
wrdy | Word | 2 | 08-03-2017 06:55 PM |
Word forces use of a specific style
|
C_Hawk1996 | Word | 1 | 04-13-2016 05:35 AM |
How to set the left indent in a specific style.
|
OfficeBoy95 | Word | 2 | 05-12-2014 06:31 PM |
| How do I add a custom style to tab button? | kennethc | Word | 1 | 04-11-2014 05:25 PM |
| How to set style automatically for specific texts | ragesz | Word | 2 | 07-25-2013 07:08 AM |