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

Tip: Looking for answers? Try searching our database.

Can I add "Plc [0-9]{1,}%"

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Steved - 28 May 2006 02:41 GMT
Hello From Steved Thankyou in Advance.

Can I add "Plc [0-9]{1,}%" to the below macro or do I have to have 2 macro's
please.

Sub Win()
Selection.HomeKey wdStory
Selection.Find.ClearFormatting
With Selection.Find
 Do While .Execute(FindText:="Win [0-9]{1,}%", MatchWildcards:=True,
Wrap:=wdFindContinue, Forward:=True) = True
    Selection.Paragraphs(1).Range.Delete
    Loop
   End With
End Sub
Greg Maxey - 28 May 2006 03:14 GMT
Did you try?

Sub WinOrPlc()
Selection.HomeKey wdStory
Selection.Find.ClearFormatting
With Selection.Find
 Do While .Execute(FindText:="Win [0-9]{1,}%", MatchWildcards:=True,
Wrap:=wdFindContinue, Forward:=True) = True
   Selection.Paragraphs(1).Range.Delete
 Loop
 Do While .Execute(FindText:="Plc [0-9]{1,}%", MatchWildcards:=True,
Wrap:=wdFindContinue, Forward:=True) = True
   Selection.Paragraphs(1).Range.Delete
 Loop
End With
End Sub

Signature

Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.

> Hello From Steved Thankyou in Advance.
>
[quoted text clipped - 11 lines]
>    End With
> End Sub
Steved - 28 May 2006 03:25 GMT
Hello Greg

Yes I did with the exception,  I left out  Loop

Thankyou.

> Did you try?
>
[quoted text clipped - 28 lines]
> >    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.