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 / August 2007

Tip: Looking for answers? Try searching our database.

Delete text between two bookmarks

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Word.user - 20 Aug 2007 04:56 GMT
Hi,
How to delete text between two bookmarks.
To get the text I am using:
vstring =
ActiveDocument.Range(ActiveDocument.Bookmarks("bookmark1").Range.Start,
ActiveDocument.Bookmarks("bookmark2").Range.End)

But I dont know how to delete it

Thanks in advance
Russ - 20 Aug 2007 08:03 GMT
Word,
Public Sub testdeleterange()
Dim aRange As Word.Range
Set aRange = ActiveDocument.Range( _
ActiveDocument.Bookmarks("bookmark1").Range.Start, _
ActiveDocument.Bookmarks("bookmark2").Range.End)
MsgBox aRange.Text
aRange.Delete
End Sub

> Hi,
> How to delete text between two bookmarks.
[quoted text clipped - 6 lines]
>
> Thanks in advance

Signature

Russ

drsmN0SPAMikleAThotmailD0Tcom.INVALID

 
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.