Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / October 2005

Tip: Looking for answers? Try searching our database.

Using Range.Delete inserts a space after the deleted character

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Alex - 08 Oct 2005 11:53 GMT
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"
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.