Greg
Sun Dec 02 14:01:48 PST 2007
Jonathan,
Yes, I have tried every approach that I can think of and you suggestion
numbers among the few.
I concede that my frustration is tied to my own insistence to select the
text. I am playing around with some code that allows a user to evaluate
each spelling error and choose to let it stand or suppress the proofing. The
procedure selects and brings the error into view and displays a userform
that provides the options. Here is a snippet of the code.
.............
Set oRngCurrent = myErrors(1)
If myErrors.Count > 0 Then
myErrors(1).NoProofing = True
On Error Resume Next
If oRngCurrent.Start = myErrors(1).Start Then
Do
oRngCurrent.MoveStart wdCharacter, -1
oRngCurrent.NoProofing = True
Loop While oRngCurrent.End = myErrors(1).End
End If
On Error GoTo 0
End If
Next_Pass:
If myErrors.Count > 0 Then
ActiveWindow.ScrollIntoView myErrors(1)
myErrors(1).Select
..................
When the procedure finishes with the maintext and textframe stories, it
procedes to the headers and footers. When that happens the sceen shifts to
Draft. So if there is not way to avoid the shift on "Selection" can you
offer an alternative process of bringing the text into view and highlighting
it for the user?
--
Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.
Jonathan West wrote:
> "Greg Maxey" <gmaxey@mvps.oSCARrOMEOgOLF> wrote in message
> news:eeuZ7HSNIHA.5208@TK2MSFTNGP04.phx.gbl...
>> Jay,
>>
>> Yes, I already experienced all the other issues you mention. I
>> thought I would bypass all those details and just ask for a way to
>> stop the nightmare ;-).
>
> Sounds as if the only way to avoid the nightmare is not to Select the
> header in the first place.
>
> But if you have to select it, have you tried an alternative approach
> such as
> ActiveDocument.Sections(1).Headers(wdHeaderFooterPrimary).Range.Select
>
> (I don't have 2007 loaded on the machine I'm writing from so can't
> test this myself)