Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
macroAddict
 
Posts: n/a
Default delete duplicate commas

how do I eliminate all commas except one:
the,,,quick,brown..fox...jumps,over,the.....lazy,d og,

this doesn't work:
With ActiveDocument.Content.Find
.ClearFormatting
Do While .Execute(FindText:=",,", Forward:=True, _
Format:=True) = True
With Selection.Find
.Text = ",,"
.Replacement.Text = ","
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Loop
End With


thanks,,,,
 
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to delete a line created by equal signs? It won't delete from dial911book Microsoft Word Help 4 April 25th 05 01:17 PM
How do I stop Word from asking Delete Block? RodL Microsoft Word Help 1 April 20th 05 02:06 AM
delete duplicate a tmp file A Herbst Microsoft Word Help 1 April 4th 05 11:43 PM
Why did "delete" key discontinue to delete a selected word, line . Walter Microsoft Word Help 1 March 2nd 05 08:56 PM
i can not use delete key on my key board to delete text qumar Microsoft Word Help 1 December 31st 04 07:39 PM


All times are GMT +1. The time now is 06:12 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"