Re: Hide ribbon in Word
Re: Hide ribbon in Word
- Subject: Re: Hide ribbon in Word
- From: Axel Luttgens <email@hidden>
- Date: Fri, 26 Jun 2015 13:25:46 +0200
> Le 26 juin 2015 à 02:47, Hans van den Broek a écrit :
>
> Turns out you can turn off the ribbon in the Word Preferences. No ribbon when you run Word…
>
> Related question:
>
> To toggle the ribbon, this works:
>
> tell application "Microsoft Word"
> tell application "System Events"
> key code 15 using {option down, command down}
> end tell
> end tell
>
> while using keystroke "r" doesn’t work. Can anybody explain, please?
Hello Hans,
This one works here:
tell application "Microsoft Word" to activate
delay 1
tell application "System Events"
keystroke "r" using {option down, command down}
end tell
The delay may probably be shorter, but the idea is there: the keyboard event is sent to the frontmost application, and that application must be ready to do something with it.
As far as I can tell, "keystroke" and "key press" appear to be equivalent.
Of course, since the same may be achieved by setting Word’s property "display ribbon", there is no real point to unreliably go thru keyboard events…
HTH,
Axel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden