![]() |
|
#2
|
||||
|
||||
|
Without seeing some sample content, it's hard to know exactly what needs to be done. Try:
Code:
Sub Demo()
Application.ScreenUpdating = False
With ActiveDocument.Range
With .Find
.Wrap = wdFindStop
.MatchWildcards = True
.Text = "[! ^13]@[!.\!\?:;]^13"
.Replacement.Text = ""
.Execute
End With
Do While .Find.Found = True
Select Case Trim(.Words.First)
Case "and", "but", "or", "then"
'do nothing
Case Else
.Words.First.InsertAfter ";"
End Select
.Collapse wdCollapseEnd
.Find.Execute
Loop
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
How to delete all the punctuation marks from a paragraph?
|
Jamal NUMAN | Word | 3 | 02-26-2019 02:33 PM |
punctuation order
|
fariz | Word | 2 | 10-31-2016 12:57 AM |
Need help with modifying a replacing font VBA code- similar task but subtle change
|
kissingfrogs2003 | Word VBA | 3 | 08-30-2016 11:42 AM |
| Replacing punctuation marks with footnotes | nufc89 | Word | 2 | 05-22-2015 03:15 PM |
| Punctuation | lexsper | Word | 0 | 04-06-2015 07:26 AM |