Hi,
How can I delete all lines in my word document which begin from some word
Like "2 NICK".just send me your suggestions.
Thanks
Hi,
How can I delete all lines in my word document which begin from some word
Like "2 NICK".just send me your suggestions.
Thanks
Hi jes,
If they are paragraphs then use this particular code:
Selection.HomeKey wdStory
Selection.Find.ClearFormatting
With Selection.Find
Do While .Execute(FindText:="^p2 NICK", Forward:=True, _
MatchWildcards:=False, Wrap:=wdFindContinue, MatchCase:=True) = True
Selection.Paragraphs(2).Range.Delete
Loop
End With
Try this code this may help u...
Hi,
Thanks Wills for your suggestions ,i've tried this code but it did't show me the appropriate result......i've used this code but no deletion is performed.when i run this code it shows error on this line
MatchWildcards:=False, Wrap:=wdFindContinue, MatchCase:=True) = True.
Kindly help.....
Thanks
jesika
Just check have to done this like true
Do While Execute(FindText:="^p2 NICK", Forward:=True, _
MatchWildcards:=False, Wrap:=wdFindContinue, MatchCase:=True) = True
Selection.Paragraphs(2).Range.Delete
check the range you have given.....
ya that line is true but i m facing problem in range......
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks