How do I get bounds of Microsoft PowerPoint window?

tell application "Microsoft PowerPoint" to get the bounds of the front window

This line of AppleScript produces no error but outputs no result.

At the time of running it, PowerPoint was open with a single blank document.

Hi!

When you are dealing with Microsoft products, you should look for stuff that begins with active in their name, in the dictionary, and see what class that active item points to.

tell application "Microsoft PowerPoint" to set c to get bounds of its document window 1

or even simpler


tell application "Microsoft PowerPoint" to set theBounds to bounds of active window

And much better, since that will work regardless of if it is a presentation window, document window, etc. :slight_smile:

Thanks for the tip to look for “active” in the library for Microsoft applications

In this instance, simply changing “front” to “active” works too.

tell application "Microsoft PowerPoint" to get the bounds of active window