Quote:
Originally Posted by macropod
Why not just use a Find/Replace?
|
The biggest reason is that I'd need to refactor a ton of code to make it work that way, and do so in a way inconsistent with the rest of my code. Normally I'd just do that, but in context of the whole project it's a lot more work than it sounds like.
My hope is that there's a simple flag I can use for "Don't delete adjacent spaces" - I think I've seen info about how to set that in Word option menus, but I can't find anything about doing it in VBA code.
EDIT: Never mind, figured it out. If I replace
VarRange.Delete with
VarRange.Text = "" then it works fine. It seems like the adjacent space cleanup only applies when the .Delete procedure is run, and any other method of deleting it will leave the spaces.