![]() |
|
#2
|
|||
|
|||
|
Hi, Jakov93! There are several types of a dash: minus/hyphen (chr(45)), en-dash (chr(150)), and em-dash (chr(151). Try using each of them or alll of them at once with .MatchWildcards = True:
Code:
.text = "[" & Chr(45) & Chr(150) & Chr(151) & "]" & Chr(32) Code:
With oRng.Find
.ClearFormatting
.Replacement.ClearFormatting
.text = "(?)- "
.Replacement.text = "\1"
.Forward = True
.Wrap = wdFindStop
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
.Execute Replace:=wdReplaceAll
End With
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| word hyphenation | rogiburn | Word | 3 | 05-12-2021 10:24 AM |
How do I remove [enter]s in copied doc?
|
technofleep | Word | 7 | 06-28-2016 04:39 PM |
Word 2003 Brackets appear around copied text
|
barrage | Word | 1 | 12-16-2015 02:59 PM |
Finding and Replacing a word with text copied to clip board
|
spc94 | Word VBA | 3 | 06-25-2015 04:46 AM |
| Copied shape/text box pastes as an image in Word | spectator | Word | 0 | 06-04-2014 08:45 AM |