3

I want to avoid using the mouse, touchpad or moving cursor to the down right corner "ruler" but I could not find a keyboard shortcut to Zoom in/out in a crecendo and decrecendo way. The only one I found is "Zoom100" but that is not what I'm looking for.

Is there a way to do this with a MS macro or using autohotkey?

1
  • 1
    ALT WQE [some number] enter.. but that is horrible. Apparently no native shortcut exists for zoom in/ zoom out
    – Matt
    Jan 2, 2015 at 16:25

3 Answers 3

4

AFAIK there's no keyboard shortcuts specifically for zooming.

Instead, create these two new VBA routines (macros):

Sub MyZoomIn()
  Dim iZoom As Long
  iZoom = ActiveWindow.View.Zoom
  iZoom = iZoom + 5
  ActiveWindow.View.Zoom = iZoom
End Sub

Sub MyZoomOut()
  Dim iZoom As Long
  iZoom = ActiveWindow.View.Zoom
  iZoom = iZoom - 5
  ActiveWindow.View.Zoom = iZoom
End Sub

Source

Then assign keyboard shortcuts to them:

  1. Click the File tab.

  2. Click Options.

  3. Click Customize Ribbon, and then click Customize.

  4. In the Save changes in box, click the current document name or template that you want to save the keyboard shortcut changes in.

  5. In the Categories box, click the category that contains the command or other item that you want to assign a keyboard shortcut to or remove a keyboard shortcut from.

  6. In the Commands box, click the name of the command or other item that you want to assign a keyboard shortcut to or remove a keyboard shortcut from.

    Any keyboard shortcuts that are currently assigned appear in the Current keys box.

  7. Assign a keyboard shortcut:

    a. Begin keyboard shortcuts with CTRL or a function key.

    b. In the Press new shortcut key box, press the combination of keys that you want to assign. For example, press CTRL plus the key that you want to use.

    c. Look at Currently Assigned to see if the combination of keys is already assigned to a command or other item. If so, select a different combination.

    d. Click Assign.

Source

1

I would take TECHIE007's answer a step further, by adding the following code to a module in Normal.dotm:

Const FineZoom As Double = 5
Const CoarseZoom As Double = 25
Const MaxZoom As Double = 500
Const MinZoom As Double = 10

Sub ZoomInFine()
    With ActiveWindow.View
        If .Zoom <= (MaxZoom - FineZoom) Then .Zoom = .Zoom + FineZoom
    End With
End Sub

Sub ZoomOutFine()
    With ActiveWindow.View
        If .Zoom >= (MinZoom + FineZoom) Then .Zoom = .Zoom - FineZoom
    End With
End Sub

Sub ZoomInCoarse()
    With ActiveWindow.View
        If .Zoom <= (MaxZoom - CoarseZoom) Then .Zoom = .Zoom + CoarseZoom
    End With
End Sub

Sub ZoomOutCoarse()
    With ActiveWindow.View
        If .Zoom >= (MinZoom + CoarseZoom) Then .Zoom = .Zoom - CoarseZoom
    End With
End Sub

To do this, open a blank document in Word, and then:

  1. Open the VBA Editor by pressing Alt+F11
  2. Find "Normal" in the Project Explorer, right-click, then select 'Insert' and 'Module'

VBA snip

  1. Copy and paste the above code into the newly-created, blank code module.
  2. Save the VBA code (Ctrl+S) and close the VBA Editor

Using TECHIE007's instructions, I then would bind:

  • ZoomInCoarse to Ctrl+Shift+Numpad +
  • ZoomOutCoarse to Ctrl+Shift+Numpad -
  • ZoomInFine to Ctrl+Alt+Shift+Numpad +
  • ZoomOutFine to Ctrl+Alt+Shift+Numpad -

This form of the code allows a tunable rate of zoom, with automatic detection of zoom limits to avoid VBA runtime errors. If the fine and/or coarse zoom rates, or the zoom limits, are not to one's liking, they can readily be changed.

The behavior could be further customized by, e.g., adding macros that set particular favorite levels of zoom and binding shortcut keys.

12
  • is this just ONE macro to be installed as a regular macro inside Word? or four different macros
    – AMDG
    Jan 2, 2015 at 20:26
  • Four different macros, but they all need to go in a single code module.
    – hBy2Py
    Jan 2, 2015 at 20:46
  • at the MS Visual Basic should I right click "Modules" then "Insert" then "Module" and then paste that whole code? or should I right click the folder below "Modules" that is "NewMacros" and "Insert" and "Module". i'm not familiar with that and I'm afraid to affect all my macros
    – AMDG
    Jan 3, 2015 at 0:37
  • I'll edit my answer with some screenshots and instructions when I get the chance. Early next week at the latest.
    – hBy2Py
    Jan 3, 2015 at 1:00
  • I wait for that. Is it going to work also in Outlook message?
    – AMDG
    Jan 4, 2015 at 1:45
0

I assume if you can try magnifier keys such as [windows button] + '+' for zoom in and [windows button] + '-' (minus sign) for zoom out in word doc...

1
  • this may be the last resort Mar 19, 2021 at 20:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.