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.

Macro will not stop at the bottom off the page.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Steved - 09 May 2006 10:17 GMT
Hello from Steved

Below I want to delete as you see in my Macro but it will stop at the bottom
off the page. Have you any solutions to my issue please. Thankyou.

All 8:0:1:1:3
Prz $3,600
Win 0%
Plc 25% L 1:0:1
R 7:0:1
F 0:0:0

Sub Win()
Dim i As Long
For i = 1 To ActiveDocument.Paragraphs.Count
If i > 1 Then
   Set MyRange = ActiveDocument.Paragraphs(i).Range
   MyRange.End = MyRange.Start + i
   Selection.Find.ClearFormatting
   With Selection.Find
       .Text = "Win [0-9]{1,}%"
       .Replacement.Text = ""
       .Forward = True
       .Wrap = wdFindContinue
       .Format = False
       .MatchCase = False
       .MatchWholeWord = False
       .MatchAllWordForms = False
       .MatchSoundsLike = False
       .MatchWildcards = True
   End With
   Selection.Find.Execute
   Selection.Delete Unit:=wdCharacter, Count:=2
   Selection.Find.ClearFormatting
   With Selection.Find
       .Text = "Plc [0-9]{1,}%"
       .Replacement.Text = ""
       .Forward = True
       .Wrap = wdFindContinue
       .Format = False
       .MatchCase = False
       .MatchWholeWord = False
       .MatchAllWordForms = False
       .MatchSoundsLike = False
       .MatchWildcards = True
   End With
   Selection.Find.Execute
   Selection.Delete Unit:=wdCharacter, Count:=2
   End If
   Next i
End Sub
Christian Freßdorf - 09 May 2006 10:33 GMT
Hi Steved,

what's on now: does the macro stopped at the bottom or not?
And what is your question?

You got in january 2005 a few answers for a (nearly) similary question, so
take a look at it, understand the doing and adapt it to your problem.

Learning by (self-)doing ;-)

Signature

regards Christian
~~~~~~~~~~~~~~~~
reply only to this newsgroup

Steved - 09 May 2006 10:53 GMT
Hello Christian

What happens when it gets to the bottom it then delets all the way backup to
the top off the page leaving the page blank.

> Hi Steved,
>
[quoted text clipped - 5 lines]
>
> Learning by (self-)doing ;-)
Jezebel - 09 May 2006 11:09 GMT
Sounds like a good outcome to me. What have you got against blank pages?

> Hello Christian
>
[quoted text clipped - 12 lines]
>>
>> Learning by (self-)doing ;-)
Steved - 09 May 2006 19:51 GMT
Hello Jezebel

I got nothing against blank pages just that I have not got round to how
would one read it.

> Sounds like a good outcome to me. What have you got against blank pages?
>
[quoted text clipped - 14 lines]
> >>
> >> Learning by (self-)doing ;-)
Doug Robbins - Word MVP - 09 May 2006 20:30 GMT
That's the point, it saves you from going to the trouble of reading it.

Signature

Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

> Hello Jezebel
>
[quoted text clipped - 21 lines]
>> >>
>> >> Learning by (self-)doing ;-)
Steved - 09 May 2006 20:48 GMT
Hello Doug

you are ahead off me on this one, but yes you are right, but when the boss
looks at a blank page I would wonder if he has a sence of humor like the rest
off us.

> That's the point, it saves you from going to the trouble of reading it.
>
[quoted text clipped - 23 lines]
> >> >>
> >> >> Learning by (self-)doing ;-)
Doug Robbins - Word MVP - 09 May 2006 21:10 GMT
That's why he's the boss.

Signature

Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

> Hello Doug
>
[quoted text clipped - 32 lines]
>> >> >>
>> >> >> Learning by (self-)doing ;-)
Steved - 09 May 2006 21:45 GMT
I've finally understood Cheers.

> That's why he's the boss.
>
[quoted text clipped - 34 lines]
> >> >> >>
> >> >> >> Learning by (self-)doing ;-)
Jezebel - 10 May 2006 09:09 GMT
Lack of a sense humour and lack of sense are the same thing.

> Hello Doug
>
[quoted text clipped - 32 lines]
>> >> >>
>> >> >> Learning by (self-)doing ;-)
Steved - 10 May 2006 10:28 GMT
Some off us are quiet unique also meaning one knows when to quit.

> Lack of a sense humour and lack of sense are the same thing.
>
[quoted text clipped - 34 lines]
> >> >> >>
> >> >> >> Learning by (self-)doing ;-)
 
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.