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.

I only want to delete Plc 0% not L 5:0:0

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Steved - 29 May 2006 05:25 GMT
Hello from Steved Thankyou in Advance.

When I run the below macro it deletes the whole paragraph is it possible
please to modify the below macro to delete Plc 0% and leave L 5:0:0

Plc 0% L 5:0:0

Sub Win()
Selection.HomeKey wdStory
Selection.Find.ClearFormatting
With Selection.Find
 Do While .Execute(FindText:="Plc [0-9]%", MatchWildcards:=True,
Wrap:=wdFindContinue, Forward:=True) = True
    Selection.Paragraphs(1).Range.Delete
    Loop
   End With
End Sub
Greg Maxey - 29 May 2006 05:39 GMT
Steved,

Some consider thanking in advance as rude ;-)

If you code to delete and entire paragraph then that is the deed that will
be done.

Sub Win()
Selection.HomeKey wdStory
Selection.Find.ClearFormatting
With Selection.Find
 Do While .Execute(FindText:="Plc [0-9]%", MatchWildcards:=True,
Wrap:=wdFindContinue, Forward:=True) = True
    Selection.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 - 14 lines]
>    End With
> End Sub
Steved - 29 May 2006 07:14 GMT
Thanks Greg

And I will in future not thank in advance, I did not think.

Cheers.

> Steved,
>
[quoted text clipped - 32 lines]
> >    End With
> > End Sub
Greg Maxey - 29 May 2006 07:28 GMT
Steved,

I think that the general consensus is that you have been shown enough find
and replace basics over the last year or so to educate a mule.  No offense
intended mate.  I also ask a lot of questions that a master would consider
primary.  Often after asking I try, fail, try again fail, try again and
succeed. My point is that I wish that you would try to apply the things that
you have already learned.

Signature

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

> Thanks Greg
>
[quoted text clipped - 44 lines]
>>>    End With
>>> End Sub
Steved - 29 May 2006 08:40 GMT
Hello Greg from Steved.

Greg you need to take a step back, as I find what you have written to be
completley out off context, you need to understand that someone like myself
may have only one project, but tries to inprove ( "Yes you guessed it I do
not use word very often ") so yes I ask questions which are important to me
and may seem basic to you but not understanding the terminology in putting
macros together in my case I believe that is why this forum was set up in the
first place, if people desire not to answer me well that's fine, so here lies
the lesson Greg as said earlier in my statement I am not a word person but
value very much the input you have all given to me. So if I come back to this
forum just ignore me, if that is how you feel.

Thankyou.

> Steved,
>
[quoted text clipped - 53 lines]
> >>>    End With
> >>> End Sub
Greg Maxey - 29 May 2006 09:04 GMT
Steved,

You were insulted.  Ok, the mule bit might have been bit sarcastic, but
insulting your was not my intent. My intent was to suggest that you "learn
from what you have already asked."  Try a Google search for "Steved" and
"Find and Replace."  I think that you will find that you are asking
questions that others have arleady answered for you. ;-)

Signature

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

> Hello Greg from Steved.
>
[quoted text clipped - 75 lines]
>>>>>    End With
>>>>> End Sub
Jezebel - 29 May 2006 09:28 GMT
Well said.

> Steved,
>
[quoted text clipped - 83 lines]
>>>>>>    End With
>>>>>> End Sub
Greg Maxey - 29 May 2006 09:45 GMT
Has your e-mail account been restored?  Still anxiously awaiting offline
contact.

Signature

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

> Well said.
>
[quoted text clipped - 88 lines]
>>>>>>>    End With
>>>>>>> End Sub
Steved - 29 May 2006 09:32 GMT
Hello Greg from Steved.

I know about Google and where you are coming from, but I am sorry you need
to understand that they got me started , but not what I need, to have a
satifactory result, meaning I have over 700 pages, I need to extract
information that in the end it will condense it down to 9 pages off
information I require. Yes it does it in a fashion. Just take last Sunday for
an example, I spent over two hours going through this forum trying to find
something similar to my issue, so believe me it is not for trying as is in my
case but I am determined to get a satifactory result, and believe me I will,
but in my case sadly it will it will take time.

ps  No you did not insult me, I just felt that you needed to know that for
some off us it takes a bit longer for it to sink in.

Cheers.

> Steved,
>
[quoted text clipped - 83 lines]
> >>>>>    End With
> >>>>> End Sub
Greg Maxey - 29 May 2006 09:44 GMT
Ask an thou shalt recieve.

Signature

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

> Hello Greg from Steved.
>
[quoted text clipped - 110 lines]
>>>>>>>    End With
>>>>>>> End Sub
Steved - 29 May 2006 09:53 GMT
Hello Greg from Steved

I shall.

Have a good day or evening what ever the time is, where you are at.

Cheers.

> Ask an thou shalt recieve.
>
[quoted text clipped - 112 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.