When I use Range.Delete() to delete a character in a run, Word automatically inserts a space after it.
So, given: "aaaXbbb"
When "X" is deleted, the result is: "aaa bbb" (with a space in the middle)
I tried setting Options.SmartCutPaste to false but it does not help.
Please advise.
Best wishes,
Alex.

Signature
Address email to user "response" at domain "alexoren" with suffix "com"
Doug Robbins - 08 Oct 2005 14:56 GMT
Use .Range.Text=""

Signature
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
When I use Range.Delete() to delete a character in a run, Word automatically
inserts a space after it.
So, given: "aaaXbbb"
When "X" is deleted, the result is: "aaa bbb" (with a space in the middle)
I tried setting Options.SmartCutPaste to false but it does not help.
Please advise.
Best wishes,
Alex.

Signature
Address email to user "response" at domain "alexoren" with suffix "com"
Alex O. - 08 Oct 2005 18:46 GMT
[ posting via Google ]
> Use .Range.Text=""
Same behavior as the .Delete, space gets inserted.
I am deleting the ']' character. Perhaps it is significant?
Doug Robbins - 08 Oct 2005 21:05 GMT
There is nothing between the first " and the second "

Signature
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
>[ posting via Google ]
>
[quoted text clipped - 3 lines]
>
> I am deleting the ']' character. Perhaps it is significant?
Alex O. - 08 Oct 2005 18:48 GMT
Update:
Happens on Word 2003 from a C# add-in I'm writing.
Cannot recreate it with Word 2000 using a macro.
Alex O. - 08 Oct 2005 19:29 GMT
[ posting from google ]
OK, more details:
I managed to recreate the problem with Word 2000 macros after all and
setting
Application.Options.SmartCutPaste = False
did solve the problem.
I'll revisit it again when I have access to Word 2003.
Best wishes,
Alex.
--
Address email to user "response" at domain "alexoren" with suffix "com"