![]() |
|
#5
|
|||
|
|||
|
I have identified that this is the part of the code that inserts bold quotes around the main bold definition text at the beginning. Can someone help me with the code so that if the definition starts with a square bracket that the quote inserts after the square bracket and not before (see doc at beginning of post). I've tried Graham's search and replace but it doesn't seem to work. Thanks
Code:
With orng.Find
.Text = ""
.Replacement.Text = "^034^&^034"
.Font.Bold = True
.Format = True
.MatchWildcards = True
While .Execute
If Not InStr(orng.Text, Chr(13)) Then
While orng.Characters.Last = Chr(32)
orng.Characters.Last.Font.Bold = False
orng.End = orng.End - 1
Wend
orng.Text = Chr(34) & orng.Text & Chr(34)
If orng.Characters.First.Previous = Chr(13) Then
orng.Collapse wdCollapseEnd
orng.Font.Bold = False
orng.Characters.Last = vbTab
Else
orng.Collapse wdCollapseEnd
End If
End If
Wend
End With
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Insert Block Quote into Numbered List | krose4088 | Word | 4 | 12-10-2020 02:29 PM |
Delete blank paragraph below bold, end square bracket
|
Dave T | Word VBA | 2 | 04-28-2019 11:00 PM |
Remove repeated number after square bracket
|
jeffreybrown | Word VBA | 8 | 12-04-2018 06:01 PM |
| Word 2010 - Remove square-bracket encased string in large document | IntestinalWorm | Word | 1 | 06-20-2017 01:14 AM |
Insert caption to graphic with square text wrapping
|
nothing_kills | Drawing and Graphics | 7 | 01-20-2014 10:57 PM |