Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-08-2015, 03:37 PM
mrlemmer11 mrlemmer11 is offline vba code to change word zoom level based on Display monitor being Portrait or Landscape mode? Windows 7 32bit vba code to change word zoom level based on Display monitor being Portrait or Landscape mode? Office 2010 32bit
Novice
vba code to change word zoom level based on Display monitor being Portrait or Landscape mode?
 
Join Date: Jun 2015
Posts: 13
mrlemmer11 is on a distinguished road
Default vba code to change word zoom level based on Display monitor being Portrait or Landscape mode?


Hi there all of us at work have dual 21 inch widescreen monitors. Some of us prefer to have our second monitor actually be in landscape mode, but some of us physically turn our 2nd monitor so that it is taller rather than wide. we then hit control alt left so that what shows on our screen is also adjusted.


Those of use who keep our second monitor wider rather than taller prefer this:
Code:
With ActiveDocument.ActiveWindow.View
    .Type = wdPrintView
    .Zoom.Percentage = 120
    .FullScreen = True
End With
while those of us who prefer it to be taller rather than wider prefer this:
Code:
With ActiveDocument.ActiveWindow.View
    .Type = wdPrintView
    .Zoom.Percentage = 104
    .FullScreen = True
End With
So i can def do an if statement... but I don't know the code to determine what orientation the display with my word application is currently at.. any thoughts?
Reply With Quote
  #2  
Old 07-08-2015, 03:54 PM
mrlemmer11 mrlemmer11 is offline vba code to change word zoom level based on Display monitor being Portrait or Landscape mode? Windows 7 32bit vba code to change word zoom level based on Display monitor being Portrait or Landscape mode? Office 2010 32bit
Novice
vba code to change word zoom level based on Display monitor being Portrait or Landscape mode?
 
Join Date: Jun 2015
Posts: 13
mrlemmer11 is on a distinguished road
Default

Code:
Sub setFullScreen()
If Application.Height > Application.Width Then
With ActiveDocument.ActiveWindow.View
    .Type = wdPrintView
    .Zoom.Percentage = 104
    .FullScreen = True
End With
Else
With ActiveDocument.ActiveWindow.View
    .Type = wdPrintView
    .Zoom.Percentage = 120
    .FullScreen = True
End With
End If
End Sub
HAHA look at that! I figured out my own problem for once! well this is a reference for anyone else who may have the same question.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
vba code to change word zoom level based on Display monitor being Portrait or Landscape mode? Word prints in landscape when portrait is selected uncledewey Word 1 02-02-2015 05:45 PM
vba code to change word zoom level based on Display monitor being Portrait or Landscape mode? Large number of landscape pages within a portrait doc--do I have to textbox by hand every landscape? mlkmnsgrl Word 7 01-05-2015 05:19 PM
Remote mouse buttons change mode unpredictably with external monitor pjscott PowerPoint 0 03-15-2013 08:40 PM
vba code to change word zoom level based on Display monitor being Portrait or Landscape mode? Word 2010 How to use both portrait & Landscape in one document Hatman11 Word 5 08-05-2011 01:19 PM
Portrait & Landscape Headers in Same Word Document Coast331 Word 0 10-24-2009 02:39 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:56 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