RobBroekhuis
Technical User
Another one I can't explain. I'm going around deleting double paragraph marks (i.e., empty lines). The following code does the trick:
It's written like this rather than a straight find/replace because some of other problem with the replace method that I don't recall now. Anyway, this works like a charm. But I have one document in which for some reason one pesky double paragraph mark is not FOUND by Word. Nothing odd going on in the document at that point (no page breaks, fields, or anything, just straight text). I can't for the life of me figure out what is particular about that situation. Anybody have any words of wisdom?
Thanks
Rob
Code:
Do
erng.StartOf wdStory
erng.Find.Execute "^p^p"
If erng.Find.found Then
erng.Collapse
erng.Delete wdCharacter
End If
Loop While erng.Find.found
Thanks
Rob