View Single Post
 
Old 05-28-2011, 07:44 AM
b0x4it b0x4it is offline Windows 7 32bit Office 2010 32bit
Advanced Beginner
 
Join Date: May 2011
Posts: 95
b0x4it is on a distinguished road
Default Problem with zoom to "text width"

I have written a simple code to switch between "whole page" and "text width" zooms and it works, but the problem is that if the cursor is at the end of the page, running my code switch to the "text width" by jumps to the first of the current page. How can I force it to switch to the "text width" view of where the cursor is now?

This is the code:
Code:
    If ActiveDocument.ActiveWindow.View.Zoom.PageFit = wdPageFitTextFit Then
        ActiveDocument.ActiveWindow.View.Zoom.PageFit = wdPageFitFullPage
    Else
        ActiveDocument.ActiveWindow.View.Zoom.PageFit = wdPageFitTextFit
    End If
I appreciate your reply.
Reply With Quote