From: Pablo Cardellino on
Hi,

I need to scroll the windowpane where I'm working positioning the to
left corner of the line where a given range begins at it top left corner.

Aditionally, I would need to verify if the bottom of the last line in
the same range is visible in the screen, and if not, to zoom the window
pane until the whole range is visible.

I was looking for the ActiveWindow.ActivePane properties but I couldn't
find anything to handle this.

Can anyone help me?

Thanks in advance.

Pablo Cardellino
From: Doug Robbins - Word MVP on
To get the start of the range at the top left of the screen, you can use the
Window.ScrollIntoView Method. To determine if the whole of the range is
visible, you can use the Window.GetPoint Method, which will return an error
if it is not. By trapping that error, you should then be able to adjust the
zooming of the window by using
ActiveDocument.ActiveWindow.View.Zoom.Percentage = [some number] , in a loop
that reduces the zoom.percentage until the error no longer occurs.

--
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, originally posted via msnews.microsoft.com

"Pablo Cardellino" <pablocardellino.listas(a)gmail.com> wrote in message
news:OQv4PxW9KHA.3840(a)TK2MSFTNGP02.phx.gbl...
> Hi,
>
> I need to scroll the windowpane where I'm working positioning the to left
> corner of the line where a given range begins at it top left corner.
>
> Aditionally, I would need to verify if the bottom of the last line in the
> same range is visible in the screen, and if not, to zoom the window pane
> until the whole range is visible.
>
> I was looking for the ActiveWindow.ActivePane properties but I couldn't
> find anything to handle this.
>
> Can anyone help me?
>
> Thanks in advance.
>
> Pablo Cardellino

From: Pablo Cardellino on
Hi, Doug

that was just I needed, thanks a lot!

Regards,

Pablo Cardellino

El 17/5/2010 03:44, Doug Robbins - Word MVP escribi�:
> To get the start of the range at the top left of the screen, you can use
> the Window.ScrollIntoView Method. To determine if the whole of the range
> is visible, you can use the Window.GetPoint Method, which will return an
> error if it is not. By trapping that error, you should then be able to
> adjust the zooming of the window by using
> ActiveDocument.ActiveWindow.View.Zoom.Percentage = [some number] , in a
> loop that reduces the zoom.percentage until the error no longer occurs.
>