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 / April 2006

Tip: Looking for answers? Try searching our database.

How do I replace highlighted text - Word inserts it in front?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
PB - 03 Apr 2006 01:40 GMT
When I copy some text and wish to insert it over the top of other highlighted
text (ie replace this), Word will only insert it in front of the highted text
rather than replacing the higlighted text.  Any ideas?
Jezebel - 03 Apr 2006 01:59 GMT
You're trying to do this through VBA?

> When I copy some text and wish to insert it over the top of other
> highlighted
> text (ie replace this), Word will only insert it in front of the highted
> text
> rather than replacing the higlighted text.  Any ideas?
PB - 03 Apr 2006 03:01 GMT
No - just through normal Microsoft office - Word.  

I want to replace some words in part of a document with other words.  If I
cut some (desired) text and highlight the unwanted text, then try to past
over the higlighted text all that happens is my desired text is inserted in
front of the highlighted (unwanted) text.  

Normally this method would replace the unwanted text with the required text,
but there is something amiss in the partiular doument that I am working on
and I can't seem to find whatever option it is that uses paste as an "insert"
command rather than as a "replace" command.  Any ideas gladly accepted since
I am working my way through a 200 page document.

PB

> You're trying to do this through VBA?
>
[quoted text clipped - 3 lines]
> > text
> > rather than replacing the higlighted text.  Any ideas?
Jay Freedman - 03 Apr 2006 03:39 GMT
If you're not talking about a macro, but just copy/paste in the
regular text, go to Tools > Options > Edit and check "Typing replaces
selection".

That setting will also fix the problem if you're doing it in VBA, but
there you can make sure the setting is what you want:

Sub EditPaste()
   Dim bUserSetting As Boolean
   ' save user's current setting
   bUserSetting = Options.ReplaceSelection
   ' set it so it will replace
   Options.ReplaceSelection = True
   ' paste from clipboard at selection
   Selection.Paste
   ' restore user's setting
   Options.ReplaceSelection = bUserSetting
End Sub

--
Regards,
Jay Freedman
Microsoft Word MVP        FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.

>You're trying to do this through VBA?
>
[quoted text clipped - 3 lines]
>> text
>> rather than replacing the higlighted text.  Any ideas?
PB - 03 Apr 2006 05:14 GMT
Perfect - thanks!

PB

> If you're not talking about a macro, but just copy/paste in the
> regular text, go to Tools > Options > Edit and check "Typing replaces
[quoted text clipped - 29 lines]
> >> text
> >> rather than replacing the higlighted text.  Any ideas?
 
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.