MS Word, how to reset display settings to its original scale Topic is solved

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
songdg
Posts: 609
Joined: 04 Oct 2017, 20:04

MS Word, how to reset display settings to its original scale

Post by songdg » 26 Apr 2024, 03:06

I want to reset display settings to its original scale 100%.

User avatar
mikeyww
Posts: 27192
Joined: 09 Sep 2014, 18:38

Re: MS Word, how to reset display settings to its original scale  Topic is solved

Post by mikeyww » 26 Apr 2024, 05:33

Change zoom level in Microsoft Word

Code: Select all

; This script changes zoom level in Microsoft Word
#Requires AutoHotkey v2.0

#HotIf WinActive('ahk_exe WINWORD.exe')
^0::    ; CTRL-0 = Change zoom to 100%
^9:: {  ; CTRL-9 = Change zoom to 110%
 Static wordZoom := Map(
    '0', 100
  , '9', 110
 )
 oWord := ComObjActive('Word.Application')
 Try oWord.ActiveWindow.ActivePane.View.Zoom.Percentage := wordZoom[SubStr(ThisHotkey, -1)]
 Catch
  MsgBox 'An error occurred while zooming the Microsoft Word window.', 'Error', 'Icon!'
}
#HotIf

User avatar
andymbody
Posts: 939
Joined: 02 Jul 2017, 23:47

Re: MS Word, how to reset display settings to its original scale

Post by andymbody » 26 Apr 2024, 07:18

Thanks @mikeyww. I've been meaning to make Adobe compatible hotkeys for Office apps for awhile. Now I just need to look into how to do this for Excel. :clap:

songdg
Posts: 609
Joined: 04 Oct 2017, 20:04

Re: MS Word, how to reset display settings to its original scale

Post by songdg » 26 Apr 2024, 09:55

mikeyww wrote:
26 Apr 2024, 05:33
Change zoom level in Microsoft Word

Code: Select all

; This script changes zoom level in Microsoft Word
#Requires AutoHotkey v2.0

#HotIf WinActive('ahk_exe WINWORD.exe')
^0::    ; CTRL-0 = Change zoom to 100%
^9:: {  ; CTRL-9 = Change zoom to 110%
 Static wordZoom := Map(
    '0', 100
  , '9', 110
 )
 oWord := ComObjActive('Word.Application')
 Try oWord.ActiveWindow.ActivePane.View.Zoom.Percentage := wordZoom[SubStr(ThisHotkey, -1)]
 Catch
  MsgBox 'An error occurred while zooming the Microsoft Word window.', 'Error', 'Icon!'
}
#HotIf
Thanks, your help is really appreciated :dance:

Post Reply

Return to “Ask for Help (v2)”