Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
John Keith John Keith is offline
external usenet poster
 
Posts: 2
Default FindNext autoscroll to middle?

Using Office2003's Word (fully updated and patched)...

I have a 100 page document that has hard-returns all through out. I can't
do a replace all ^p with "" because this would mess up numerous sections and
headers.

With the find feature open to do the replacement... I can press "F" to
navigate to the next hard-return then if it is one I need to replace press
"Alt-R" this works well except that the find eventually will be the last line
on the screen and I need to see the lines both above and below the newly
found hard-return to make the decision to replace or not.

I tried using the scroll-lock key to keep the cursor in the middle of the
screen, but this does not work.

Is there a feature I can turn on to acheive what I am looking for?
Perhaps a macro function that would scroll the screen after a find (is there
an event for this?) to place the line where the cursor is positioned to
aproxamately the middle of the screen?

--
Regards,
John
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
John Keith John Keith is offline
external usenet poster
 
Posts: 2
Default FindNext autoscroll to middle?

Problem solved... using ActiveWindow.ScrollIntoView method.

Add a command button on one of the tool bars to run this macro. Start by
putting the cursor before the first hard-return to erase, then click the
toolbar button. Keep doing this until you see that the next hard-return
should be skipped. Use the right arrow to deselect and move the cursor past
the hard-return. Then click the toolbar button again.

The macro replaces the next hard-return with nothing. Then positions the
selection on the newly-next hard-return. Then, If 1000 characters beyond that
hard-return would included characters that are not in the viewed area of the
window, it scrolls this selection away from the bottom of the window. As a
bonus, using a macro to control the find-replace operation prevents the
find-replace popup dialog box from getting in the way too.

Sub ZapSelectedPara()
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "^p"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindAsk
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
s = Selection.Start
Set R = ActiveDocument.Range(Start:=s, End:=s + 1000)
ActiveWindow.ScrollIntoView R, True
With Selection
If .Find.Forward = True Then
.Collapse Direction:=wdCollapseStart
Else
.Collapse Direction:=wdCollapseEnd
End If
.Find.Execute Replace:=wdReplaceOne
If .Find.Forward = True Then
.Collapse Direction:=wdCollapseEnd
Else
.Collapse Direction:=wdCollapseStart
End If
.Find.Execute
End With
End Sub
--
Regards,
John


"John Keith" wrote:

Using Office2003's Word (fully updated and patched)...

I have a 100 page document that has hard-returns all through out. I can't
do a replace all ^p with "" because this would mess up numerous sections and
headers.

With the find feature open to do the replacement... I can press "F" to
navigate to the next hard-return then if it is one I need to replace press
"Alt-R" this works well except that the find eventually will be the last line
on the screen and I need to see the lines both above and below the newly
found hard-return to make the decision to replace or not.

I tried using the scroll-lock key to keep the cursor in the middle of the
screen, but this does not work.

Is there a feature I can turn on to acheive what I am looking for?
Perhaps a macro function that would scroll the screen after a find (is there
an event for this?) to place the line where the cursor is positioned to
aproxamately the middle of the screen?

--
Regards,
John

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Change "Autoscroll" speed Lee Beck Microsoft Word Help 1 March 15th 07 12:34 PM
How do I disable autoscroll for my mouse right-click button. penlax Microsoft Word Help 0 November 25th 06 08:31 AM
How do I slow down Autoscroll in word 2003? Rick Microsoft Word Help 2 July 15th 06 12:21 AM
AutoScroll Speed Richard O. Neville Microsoft Word Help 5 April 13th 06 01:37 AM
How can I slow down the rate/velocity of the autoscroll in Word? Mike Microsoft Word Help 0 May 8th 05 07:09 PM


All times are GMT +1. The time now is 12:08 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"