In my little niche-world, opening and closing brackets are used in tandem to denote a range of text that is being marked to be eventually removed. After something has been marked for delete it looks like this in the document (with the --> denoting a tab):
Original
-->(a)-->This is my text to be removed.
Marked up
-->[(a)-->This is my text to be removed.]
What it should be
-->(a)-->This is my text to be removed.
What is happening (notice the extra space between the tab and the opening parenthesis)
--> (a)-->This is my text to be removed.
'Set range to the bracket first
BracketRange.Delete
However, if the situation is as shown above, Word doesn't allow the tab and opening parenthesis to co-exist next to each other; it automatically inserts a space. Manually selecting the bracket and pressing the delete key generates the same result: a space. If you don't select the bracket, but rather place the insertion point immediately preceding the character and press Delete, it will perform as expected, and make the bracket go away. Why, then, does having it selected prior to pressing the delete cause a space?
'Set range to the bracket first
BracketRange.Text = ""
Which effectively does the same thing. My irritation lies in why I had to make the code change in the first place.