Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-28-2011, 07:44 AM
b0x4it b0x4it is offline Problem with zoom to "text width" Windows 7 32bit Problem with zoom to "text width" Office 2010 32bit
Advanced Beginner
Problem with zoom to "text width"
 
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
  #2  
Old 05-29-2011, 01:49 AM
macropod's Avatar
macropod macropod is offline Problem with zoom to "text width" Windows 7 32bit Problem with zoom to "text width" Office 2007
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi b0x4it,

Try:
Code:
With ActiveDocument.ActiveWindow.View.Zoom
  If .PageFit = wdPageFitTextFit Then
    .PageFit = wdPageFitFullPage
  Else
    .PageFit = wdPageFitTextFit
    Selection.GoTo what:=wdGoToBookmark, Name:="\sel"
  End If
End With
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 05-29-2011, 02:00 AM
b0x4it b0x4it is offline Problem with zoom to "text width" Windows 7 32bit Problem with zoom to "text width" Office 2010 32bit
Advanced Beginner
Problem with zoom to "text width"
 
Join Date: May 2011
Posts: 95
b0x4it is on a distinguished road
Default

Thank you very much,

Do you have any explanation why this code does not work:

Code:
        ActiveDocument.ActiveWindow.View.Zoom.PageColumns = 2
        ActiveDocument.ActiveWindow.View.Zoom.PageRows = 1
until I change it to

Code:
        ActiveDocument.ActiveWindow.View.Zoom.PageColumns = 2
        ActiveDocument.ActiveWindow.View.Zoom.PageRows = 1
        ActiveDocument.ActiveWindow.View.Zoom.Percentage = 82
?
Reply With Quote
  #4  
Old 05-29-2011, 03:01 AM
macropod's Avatar
macropod macropod is offline Problem with zoom to "text width" Windows 7 32bit Problem with zoom to "text width" Office 2007
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi b0x4it,

Possibly because the parameters you're trying to set conflict with each other and your monitor's abilities. As the interactions differ according to numerous variables (# horizontal pixels, # vertical pixels, physical screen size, etc), that I can't give a hard and fast answer.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with zoom to "text width" "contents" width sizing? dark86 Word 4 01-24-2013 11:11 AM
Wierd symbols inplace of "space", "indentation" etc aka.bhagvanji Word 5 02-16-2012 11:50 AM
Problem with zoom to "text width" Partial highlighting of text in a row in "Final Showing Markup" setting Redpoint Word Tables 4 03-11-2011 04:29 PM
"Microsoft Excel Application" missing in the "Component Services" on win08 sword.fish Excel 0 02-26-2010 02:09 PM
merge field formatting problem with "text to be inserted before" wissam Mail Merge 0 12-13-2009 12:50 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:58 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft