Word Zoom

Problem

There are no keyboard shortcuts to zoom in/out with Word

Solution

Use a custom VBA procedures to zoom in/out

VBA code

Attribute VB_Name = "ModuleZoom"
Private Const ZoomStep As Integer = 5
Sub MyZoomAssignKeys()
 'Ron de Bruin, Disable key or key combination or run a macro if you use it
 'How do I use Application.Onkey
 'https://www.rondebruin.nl/win/s4/win012.htm
 'http://www.msofficeforums.com/excel-programming/14804-application-onkey-numeric-plus.html
 
 'Shift key = "+" (plus sign)
 'Ctrl key = "^" (caret)
 'Alt key = "%" (percent sign)
 
 CustomizationContext = NormalTemplate
 Application.StatusBar = "Assigning keys to MyZoom functions..."
 
 BindThisKey wdKeyControl, wdKeyNumericAdd, "Zoomin"
 BindThisKey wdKeyControl, wdKeyNumericSubtract, "ZoomOut"
 BindThisKey wdKeyControl, wdKeyNumeric0, "Zoom100"
 BindThisKey wdKeyControl, wdKeyNumeric1, "Zoom1page"
 BindThisKey wdKeyControl, wdKeyNumeric2, "Zoom2pages"
 BindThisKey wdKeyControl, wdKeyNumeric4, "Zoom4pages"
 
 Application.OnTime Now + TimeSerial(0, 0, 1), "MyZoomResetStatusbar"
 
End Sub
Sub BindThisKey(Key1 As Integer, Key2 As Integer, Action As String)
 KeyBindings.Add KeyCode:=BuildKeyCode(Key1, Key2), _
 KeyCategory:=wdKeyCategoryCommand, Command:=Action
 
End Sub




Sub MyZoomResetStatusbar()
 Application.StatusBar = False
End Sub
Sub ZoomInNew()
 Dim ZP As Integer
 ZP = Int(ActiveWindow.ActivePane.View.Zoom.Percentage * 1.1)
 If ZP > 200 Then ZP = 200
 ActiveWindow.ActivePane.View.Zoom.Percentage = ZP
End Sub
Sub ZoomIn()
'
' ZoomIn Macro
' Suggested shortcut: Ctrl + NumKeypad Plus
' Source: http://wordribbon.tips.net/T009831_Zooming_with_the_Keyboard.html
'
 Dim ZP As Integer
 ZP = ActiveWindow.ActivePane.View.Zoom.Percentage + ZoomStep
 ZP = Round(ZP / ZoomStep) * ZoomStep
 If ZP > 200 Then ZP = 200
 ActiveWindow.ActivePane.View.Zoom.Percentage = ZP
End Sub
Sub ZoomOut()
'
' ZoomOut Macro
' Suggested shortcut: Ctrl + NumKeypad Minus
' Source: http://wordribbon.tips.net/T009831_Zooming_with_the_Keyboard.html
'
 Dim ZP As Integer
 ZP = ActiveWindow.ActivePane.View.Zoom.Percentage - ZoomStep
 ZP = Round(ZP / ZoomStep) * ZoomStep
 If ZP < 10 Then ZP = 10
 ActiveWindow.ActivePane.View.Zoom.Percentage = ZP
End Sub
Sub ZoomReset()
'
' ZoooReset Macro
' Suggested shortcut: Ctrl + NumKeypad Zero
'
 ActiveWindow.ActivePane.View.Zoom.Percentage = 100
End Sub
Sub Zoom1page()
'
' Zoom1page Macro
' Suggested shortcut: Ctrl + NumKeypad 1
'
 'ActiveWindow.ActivePane.View.Zoom.PageFit = wdPageFitFullPage
 On Error Resume Next
 If ActiveWindow.View.SplitSpecial = wdPaneNone Then
 ActiveWindow.ActivePane.View.Type = wdPrintView
 Else
 ActiveWindow.View.Type = wdPrintView
 End If

ActiveWindow.ActivePane.View.Zoom.PageFit = wdPageFitFullPage
 
 With ActiveWindow.ActivePane.View.Zoom
 .PageColumns = 1
 .PageRows = 1
 End With
End Sub
Sub Zoom2pages()
'
' Zoom2pages Macro
' Suggested shortcut: Ctrl + NumKeypad 2
'
 'ActiveWindow.ActivePane.View.Zoom.PageFit = wdPageFitNone
 With ActiveWindow.ActivePane.View.Zoom
 .PageColumns = 2
 .PageRows = 1
 End With
End Sub
Sub Zoom4pages()
'
' Zoom4pages Macro
' Suggested shortcut: Ctrl + NumKeypad 4
'
 'ActiveWindow.ActivePane.View.Zoom.PageFit = wdPageFitNone
 With ActiveWindow.ActivePane.View.Zoom
 .PageColumns = 2
 .PageRows = 2
 End With
End Sub

Sub ZoomPageWidth()
'
' Zoom1page Macro
' Suggested shortcut: Ctrl + NumKeypad 1
'
 ActiveWindow.ActivePane.View.Zoom.PageFit = wdPageFitBestFit
 
End Sub

 

Publicités

DisplayPort vs HDMI vs VGA

Basics

1987: VGA, 1999: DVI,

2006: DisplayPort 1.0, 2007: DisplayPort 1.1, 2009: DisplayPort 1.2, 2014: DisplayPort 1.3, 2016: DisplayPort 1.4

2002: HDMI 1.0, 2004: HDMI 1.1, 2005: HDMI 1.2, 2006: HDMI 1.3, 2009: HDMI 1.4, 2013: HDMI 2.0 4k 60Hz, 2017: HDMI 2.1 10k 120Hz

Articles

Switches KVM HDMI

IOGear

  • (-) GCS62HU 2-Port Cable KVM Switch with HDMI Connections
    Superior Video Resolution: Up to 3840 x 2160 @30Hz (4K UHD)1; 1920 x 1200 @60Hz

StarTech.com

  • (–) SV211HDUA, 2 Port USB HDMI Cable KVM Switch with Audio and Remote Switch, USB Powered KVM with HDMI, Dual Port HDMI KVM Switch. Supports HD resolutions (1080p – 1920×1200)

Lindy

Switches KVM DisplayPort

ATEN

  • CS782DP 2-Port USB DisplayPort/Audio KVM Switch (4K Supported and Cables included)
    (+) compact 9 x 9 x 2,7 cm,
    (+) 2 x USB-Kabel, 1,8 m, 2 x Audiokabel, 1,8 m,
    (+) 2 x DisplayPort-Kabel, 1,5 m
    (+) Fully DisplayPort 1.2 Compliant.
    (+) Power on detection.
    (+) Bus-Powered.
    (+) Firmware upgradable.

IOGear

  • GCS52DP 2-Port USB DisplayPort Cable KVM Switch
    (+) compact 8.5 x 8.3 x 2.7 cm
    (+) KVM cables: 48″ (121.92cm);
    (+) Remote Switch button: 72″ (182.88cm)
    (-) DisplayPort 1.1 (not 1.2)
    (+) Resolution up to 2560 x 1600 @ 60Hz or 4K UHD resolutions to 3840 x 2160 @ 30Hz
    (+) Bus-Powered

StarTech

 

  • (–) SV231DPU2  €152 2-port DisplayPort KVM Switch – USB 2.0 – 4K 30Hz
    black box 17.7 x 8.2 x 2.5cm, 342g, 2 x 4 ft (1.2 m) DisplayPort KVM Cables, USB-PoweredThis DP KVM Switch does not detect the power status of the connected systems, so switching to a computer that is turned off will result in no display on the monitor. It is recommended to use the same resolution for both connected systems where possible, to avoid the screen resolution change when switching between ports.

DeLock

  • 11367 Delock Displayport KVM Switch 2 > 1 with USB and Audio
    Displayport 1.1a Displayport output: resolution up to 2560 x 1440 @ 60 Hz

Lindy

  • 42343 2 Port DisplayPort, USB 2.0 & Audio KVM Switch Compact
    (+) Dimensions WxDxH: 85x55x25mm
    (-) Cable lenght 0.9m (2.95ft)
    (+) DisplayPort 1.2, USB 2.0
    (+) Maximum Resolution: 3840×2160@30Hz
  • lindy.co.uk 42343
  • lindy-international.com 42343

Switches KVM VGA

D-Link