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 / June 2005

Tip: Looking for answers? Try searching our database.

Clear text between specified characters

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tomislav - 22 Jun 2005 19:25 GMT
Hello,

i am new to Visual Basic and I am trying to make some macros for automated
dictionary reversing. What I must do is find all ranges between characters
"=" and "\" , and then clear them including ending sign "\". I tried few
methods and it always turns out wrong.

Can anyone help ?

Thanks

Tom
David Sisson - 22 Jun 2005 21:35 GMT
Sub SearchBetweenCharacters()
Dim rng As Range
Set rng = ActiveDocument.Range

srchstrng = "=*\\"

With rng.Find
   Do While .Execute(FindText:=srchstrng, MatchWildcards:= _
   True, Wrap:=wdFindStop, _
   Forward:=True) = True
       MsgBox rng
       'rng.Delete
   Loop

End With
End Sub
 
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.