![]() |
#1
|
|||
|
|||
![]()
Hi all,
Been Googling this for the last couple of days and have come up with nothing--nada! My problem is this: I have a document that contains about 75% of the words with spaces between the characters like the image attached. Crazy, eh? Well, it certainly begs the question, "how the heck did that happen?" What I have learned from my research is sometimes this can occur in PDF to Word conversions and vice versa. As it's about 150 pages long you can imagine how long it would take to manually take out all the spaces, even with find and replace. Soooooo, I'm looking for a macro that will remove the single spaces between the characters (I can manually remove the doubles between the words with F&R). This is what I've developed so far: Sub RemoveSpaces() ' ' RemoveSpaces Macro ' ' Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatting 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 Selection.MoveLeft Unit:=wdCharacter, Count:=1 Selection.MoveRight Unit:=wdCharacter, Count:=1 Selection.Delete Unit:=wdCharacter, Count:=1 End Sub However i can't get it to loop. Please advise. Thank you, David Matthews (not the band ![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Jamal NUMAN | Word | 2 | 04-28-2017 12:59 PM |
A Widlcard or Macro to Properly Remove Spaces Between Commas? | CrossReach | Word | 6 | 01-23-2017 04:28 AM |
Can I remove spaces between only Chinese characters? | sivartnosredna7 | Word | 2 | 01-09-2017 05:33 AM |
How to remove spaces from Cells which are at the end of value? | LearnerExcel | Excel | 2 | 12-19-2016 01:10 PM |
editing text and remove spaces | romanticbiro | Word VBA | 5 | 07-04-2014 07:42 PM |